Phoenix.LiveView.UploadConfig (Phoenix LiveView v0.16.0) View Source

The struct representing an upload.

Link to this section Summary

Link to this section Types

Specs

t() :: %Phoenix.LiveView.UploadConfig{
  accept: list() | :any,
  acceptable_exts: MapSet.t(),
  acceptable_types: MapSet.t(),
  allowed?: boolean(),
  auto_upload?: boolean(),
  chunk_size: term(),
  chunk_timeout: term(),
  cid: :unregistered | nil | integer(),
  client_key: String.t(),
  entries: list(),
  entry_refs_to_metas: %{required(String.t()) => map()},
  entry_refs_to_pids: %{required(String.t()) => pid() | :unregistered | :done},
  errors: list(),
  external:
    (Phoenix.LiveView.UploadEntry.t(), Phoenix.LiveView.Socket.t() ->
       {:ok | :error, meta :: %{uploader: String.t()},
        Phoenix.LiveView.Socket.t()})
    | false,
  max_entries: pos_integer(),
  max_file_size: pos_integer(),
  name: atom() | String.t(),
  progress_event:
    (name :: atom() | String.t(),
     Phoenix.LiveView.UploadEntry.t(),
     Phoenix.LiveView.Socket.t() ->
       {:noreply, Phoenix.LiveView.Socket.t()})
    | nil,
  ref: String.t()
}