Attached.StorageBackends (Attached v0.1.1)

Copy Markdown View Source

Facade for the configured storage backend.

All blob storage access goes through this module — call sites should use upload/3, download/1, etc. rather than looking up the backend and dispatching manually.

Implement Attached.StorageBackends.Behaviour to add a new backend and set config :attached, :storage_backend, MyBackend. Ships with Attached.StorageBackends.Disk for local filesystem storage.

Summary

Functions

compose(source_keys, destination_key)

current()

Returns the configured storage backend module.

delete(key)

delete_prefixed(prefix)

download(key)

download_chunk(key, range)

exists?(key)

upload(key, source_path, opts \\ [])

url(key, opts \\ [])