Attached.StorageBackends.Disk (Attached v0.2.0)

Copy Markdown View Source

Stores files on the local filesystem.

Configuration

config :attached,
  storage_backends: [
    local: {Attached.StorageBackends.Disk,
      root: Path.join(["priv", "attachments"]),
      base_url: "/attachments"}
  ]

Instance config keys:

  • :root — storage root directory (default priv/attachments)
  • :base_url — public base URL where Attached.Web.Plug is mounted (default "/attachments")

Summary

Functions

Returns the absolute filesystem path for a given key.

Functions

path_for(config, key)

Returns the absolute filesystem path for a given key.