Skip to content

Releases: rzane/file_store

v0.4.0

27 Jan 15:31
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.1...v0.4.0

v0.3.1

24 Nov 23:44
Compare
Choose a tag to compare

Documentation updates.

v0.3.0

24 Nov 23:31
Compare
Choose a tag to compare

Features

  • Delete files in bulk with FileStore.delete_all/2.
  • FileStore.get_signed_url/3 and FileStore.get_public_url/3 now support :content_type and :disposition options.
  • FileStore.Middleware.Logger can be used to log all operations
  • FileStore.Middleware.Errors can be used to return more useful error values
  • FileStore.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

13 Oct 03:52
Compare
Choose a tag to compare

Improved documentation. Thanks to @kianmeng!

v0.2.1

13 Oct 03:20
Compare
Choose a tag to compare
Delete should be successful if the key does not exist

v0.2.0

11 Oct 01:54
Compare
Choose a tag to compare

Added

  • Define read/1 for modules using FileStore.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 with Code.ensure_loaded?/1 to fix a deprecation
  • The spec for FileStore.read/2 said that it returned iodata, but in reality, it should always return binary.
  • The spec for FileStore.write/3 said that it accepted iodata, but in reality`, it only accepts binary.