Releases: rzane/file_store
Releases · rzane/file_store
v0.4.0
What's Changed
- Replace
use Mix.Config
withimport Config
by @warmwaffles in #25 - Upgrade dependencies by @warmwaffles in #26
- Update CI to test against Elixir 1.10-1.13 and OTP 22-24 by @warmwaffles in #28
- Run credo on CI by @warmwaffles in #29
- Allow
:content_type
and:disposition
to be set when writing by @warmwaffles in #27 - Adds
FileStore.copy/3
andFileStore.rename/3
by @warmwaffles in #30
New Contributors
- @warmwaffles made their first contribution in #25
Full Changelog: v0.3.1...v0.4.0
v0.3.1
v0.3.0
Features
- Delete files in bulk with
FileStore.delete_all/2
. FileStore.get_signed_url/3
andFileStore.get_public_url/3
now support:content_type
and:disposition
options.FileStore.Middleware.Logger
can be used to log all operationsFileStore.Middleware.Errors
can be used to return more useful error valuesFileStore.Middleware.Prefix
can be used to add a prefix to the key used in operations
Breaking changes
Creating your store
Previously, you'd initiate your store with FileStore.new/1
:
FileStore.new(adapter: FileStore.Adapters.Foo, foo: "bar")
Now, you'll call new/1
on the adapter itself:
FileStore.Adapters.Foo.new(foo: "bar")
Options passed to URL functions
Previously, any options you passed to get_signed_url/3
and get_public_url/3
would be forwarded to the underlying adapter. That's no longer the case. Please file an issue if this library does not support an option that you need.
FileStore.Adapter
is gone
If you made your own adapter by implementing the FileStore.Adapter
behaviour, you'll need to make some changes. Adapters are now implemented as protocols.
v0.2.2
v0.2.1
v0.2.0
Added
- Define
read/1
for modules usingFileStore.Config
- S3 configuration accepts a
:prefix
- Delete a file with
FileStore.delete/2
- List all files with
FileStore.list!/1
Fixed
- S3 configuration was ignored when running
stat/2
- Replaced
Code.ensure_compiled?/1
withCode.ensure_loaded?/1
to fix a deprecation - The spec for
FileStore.read/2
said that it returnediodata
, but in reality, it should always return binary. - The spec for
FileStore.write/3
said that it acceptediodata
, but in reality`, it only accepts binary.