Skip to content

Cleanup, Updated dependencies and added blob sas support #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7083dea
feat: cleanup and update libraries
Jun 9, 2020
77531b8
fix: use old way of error tuple handling
Jun 9, 2020
55f401f
fix: Add header for content type that was missing
Jun 9, 2020
06d54de
fix: make sure path has / at start
Jun 9, 2020
bd32d35
fix: timeout and dialyzer errors
Jun 10, 2020
916a614
fix: when request method is put add application/octet-stream
Jun 11, 2020
284a163
feat: add ability to create single blob signature
Jun 11, 2020
f4661cf
fix: make poison optional
Jun 11, 2020
b58ad1e
chore: add missing argument
Jun 11, 2020
b3bf92d
fix: use Logger instead of IO.puts to print debug messages
Jun 15, 2020
9bf5f30
feat: add ability to set different host for development mode
Jun 17, 2020
c2d9f85
fix: handle errors from get_block_list in the upload_file function
Jun 18, 2020
aaaa6a2
chore: improve dialyzer typing
Nov 30, 2020
34fdbbd
Merge remote-tracking branch 'origin/master'
Nov 30, 2020
1f637eb
fix: add missing extra application
Nov 30, 2020
8b83eaa
chore: remove some options that aren't valid
Nov 30, 2020
973f483
feat: add ability to set blob name
Jan 11, 2021
15b5513
chore: Use result of Stream instead of Agent
Jan 15, 2021
a21c8cb
chore: Split up `upload_file` into separate functions
Jan 15, 2021
946f9cf
chore: Make "magic numbers" module variables
Jan 15, 2021
3924e3c
chore: Split up upload_async function
Jan 15, 2021
278fb92
chore: Change max number of blocks to module var
Jan 18, 2021
e852097
Merge pull request #2 from bettyblocks/tasks/fix-file-upload-with-dif…
nulian Jan 18, 2021
57c59a1
chore: Return entire response instead of only code
Jan 19, 2021
dbb9e47
Merge branch 'tasks/fix-file-upload-with-different-files'
Jan 19, 2021
aacaa1d
fix: make sure library is compatible with erlang 24
bettyblocks-release-bot Jul 8, 2021
ab09933
fix: make it erlang 24 compatible and upgrade packages
bettyblocks-release-bot Jul 12, 2021
9094e1a
chore: small readme adjustment
bettyblocks-release-bot Jul 13, 2021
16e2ddf
Update README.md
nulian Jan 5, 2022
2480296
Update README.md
nulian Jan 5, 2022
f64855c
feat: update library to latest version
bettyblocks-release-bot Mar 24, 2022
46a0727
chore: add missing files
bettyblocks-release-bot Mar 24, 2022
30c658e
chore: add missing file for test
bettyblocks-release-bot Mar 24, 2022
547b126
Update README.md
nulian Mar 24, 2022
b147de0
Update README.md
nulian Mar 25, 2022
4013f3e
Set blob-headers during upload
Nov 21, 2022
f171156
Merge pull request #4 from bettyblocks/tasks/set-content-type-during-…
nulian Nov 21, 2022
d997718
feat: add support for setting properties on upload file
bettyblocks-release-bot Nov 21, 2022
80a6c24
chore: remove type-check on upload-file
Nov 22, 2022
cc76d3b
Merge pull request #5 from bettyblocks/tasks/set-content-type-during-…
nulian Nov 22, 2022
956169a
chore: bump version number
nulian Nov 22, 2022
e95496f
feat: support parsing blob tags in list_blobs via include
jfro Dec 19, 2022
36ae10b
Merge pull request #6 from AstroHQ/jtk/blob-tags
nulian Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Used by "mix format"
[
import_deps: [:tesla],
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: "24.0"
elixir-version: "1.12.0"
- uses: actions/cache@v2
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: docker-compose up -d
- run: mix deps.get
- run: mix credo --strict
- run: mix dialyzer
- run: mix test --include external
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# The directory Mix downloads your dependencies sources to.
/deps/

# Dialyzer builds
priv/plts

# Where 3rd-party dependencies like ExDoc output generated docs.
/doc/

Expand All @@ -23,3 +26,5 @@ erl_crash.dump
ex_microsoft_azure_storage-*.tar

/.elixir_ls
/.idea/
*.iml
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## 0.3.4 - 2021-10-25

- `Blob.put_blob_from_url` content type warning is now suppressible in config.

## 0.3.3 - 2021-10-06

### Fixed

- `Blob.get_blob_properties` no longer raises when the blob is not found.

## 0.3.2 - 2021-08-08

### Fixed

- `BlobStorage.get_blob_service_properties` now works correctly with the Azure Storage simulator
Azurite.

## 0.3.1 - 2021-07-12

### Fixed

- #3 Workaround now preserves all blob properties, or attempts to at least.

## 0.3.0 - 2021-07-12

### Added

- Support for Azure Storage connection strings
- Support for getting, setting and updating blob properties
- #3 Workaround for loss of `content-type` when using `Blob.put_blob_from_url/2`

## 0.2.3 - 2021-07-05

### Added

- Generate SAS tokens overriding content-disposition, content-encoding, content-language and so on.

## 0.2.2 - 2021-07-05

### Fixed

- SAS tokens now correctly generated to API version `2020-04-08`

## 0.2.1 - 2021-07-05

### Fixed

- `BlobStorage.get_blob_service_properties` and `BlobStorage.get_blob_service_stats` now function as expected.

## 0.2.0 - 2021-07-05

### Added

- Add `Blob.put_blob` and `Blob.put_blob_from_url` APIs

### Changed

- Bump API version from `2018-03-28` to `2020-04-08`

## 0.1.0 - 2021-07-05

### Added

- Pull in work from original [ex_microsoft_azure_storage](https://github.com/chgeuer/ex_microsoft_azure_storage).
20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2021

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

Based off https://github.com/joeapearson/elixir-azure because of outdated dependencies

# ExMicrosoftAzureStorage

An early prototype of an SDK to interact with Microsoft Azure Storage.
A SDK to interact with Microsoft Azure Storage.

## Installation

Expand All @@ -10,7 +13,11 @@ by adding `ex_microsoft_azure_storage` to your list of dependencies in `mix.exs`
```elixir
def deps do
[
{:ex_microsoft_azure_storage, app: false, github: "chgeuer/ex_microsoft_azure_storage", ref: "master"}
{:ex_microsoft_azure_storage, "~> 1.0"},

# Optional dependency, you can also add your own json_library dependency
# and config with `config :ex_microsoft_azure_storage, json_library, YOUR_JSON_LIBRARY`
{:jason, "~> 1.1"}
]
end
```
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
use Mix.Config
import Mix.Config

# Do not put any config here...
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.9"
services:
azure:
image: mcr.microsoft.com/azure-storage/azurite:3.11.0
ports:
- "10000:10000"
command: azurite-blob --blobHost 0.0.0.0 --blobPort 10000
5 changes: 5 additions & 0 deletions lib/ex_microsoft_azure_storage.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defmodule ExMicrosoftAzureStorage do
@moduledoc """
Documentation for `ExMicrosoftAzureStorage`.
"""
end
5 changes: 0 additions & 5 deletions lib/fiddler.ex

This file was deleted.

Loading