exfile v0.3.1 Exfile.Phoenix.Helpers
View helpers to use Exfile in your Phoenix app.
To use these helpers, import it in the view
section of your web/web.ex
file.
defmodule MyApp.Web do
def view do
quote do
use Phoenix.View, root: "web/templates"
...
import Exfile.Phoenix.Helpers
end
end
end
Summary
Functions
Returns the absolute path of a file with the options passed
Returns the absolute URL of a file with the options passed
Types
exfile_path_opts :: [processor: String.t, processor_args: [String.t], format: String.t]
Functions
Specs
exfile_path(Exfile.File.t, exfile_path_opts) :: String.t
Returns the absolute path of a file with the options passed.
Specs
exfile_url(atom, Exfile.File.t, exfile_path_opts) :: String.t
exfile_url(Plug.Conn.t | Phoenix.Socket.t | URI.t, Exfile.File.t, exfile_path_opts) :: String.t
exfile_url(Exfile.File.t, exfile_path_opts, []) :: String.t
Returns the absolute URL of a file with the options passed.
The first argument accepts any parameter that the Phoenix generated _url
function takes. If cdn_host
is configured for Exfile, this first argument
is not necessary.