Packages

Elixir implementation of the tus protocol using plug.

Current section

Files

Jump to
exotus lib exotus plug options.ex
Raw

lib/exotus/plug/options.ex

defmodule Exotus.Plug.Options do
@moduledoc false
import Plug.Conn
def init(opts), do: opts
def call(conn, _) do
conn
|> put_resp_header("tus-max-size", Integer.to_string(conn.private.exotus_config.max_size))
|> put_resp_header("tus-extension", Enum.join(Exotus.supported_extensions(), ","))
|> send_resp(:no_content, "")
end
end