Where Storehouse.Tus.Plug keeps each upload between requests: its key,
size, offset, metadata and, on a store of multipart uploads, its parts
and the bytes not yet a part. Storehouse.Tus.State.ETS is the default,
one node's.
An upload is a map with an :id (upload/0). Every field of it must
be kept as it is: in a database, as an Erlang term (:erlang.term_to_binary/1,
in a bytea column) beside the id and expires_at.
Summary
Callbacks
Forgets the upload with id.
The uploads whose :expires_at is before now.
The upload with id, or nil.
The uploads in progress of owner (an upload's :owner): with it, the
plug limits how many one owner has at once (:max_uploads), and counts
their sizes against its :room.
Keeps upload, in place of the one with its id.
Types
@type upload() :: %{ :id => String.t(), :expires_at => DateTime.t(), optional(atom()) => term() }
An upload in progress, as the plug keeps it.
Callbacks
@callback delete(String.t()) :: :ok
Forgets the upload with id.
@callback expired(now :: DateTime.t()) :: [upload()]
The uploads whose :expires_at is before now.
The upload with id, or nil.
The uploads in progress of owner (an upload's :owner): with it, the
plug limits how many one owner has at once (:max_uploads), and counts
their sizes against its :room.
@callback put(upload()) :: :ok
Keeps upload, in place of the one with its id.