View Source Waffle.Storage.Local (waffle v1.1.9)
Local storage provides facility to store files locally.
Local configuration
config :waffle,
storage: Waffle.Storage.Local,
# in order to have a different storage directory from url
storage_dir_prefix: "priv/waffle/private",
# add custom host to url
asset_host: "https://example.com"
If you want to handle your attachments by phoenix application, configure the endpoint to serve it.
defmodule AppWeb.Endpoint do
plug Plug.Static,
at: "/uploads",
from: Path.expand("./priv/waffle/public/uploads"),
gzip: false
end