Skip to main content
Version: 56.0.0

Upload a file without chunking

POST 

/api/v1/uploads/content

Creates a ready upload without chunking, from one request whose body is the whole file, for a client that does not use the resumable protocol: no size, offset, or tus header is needed. Reference the returned id as primaryFile.uploadId when creating a document. See Uploading files.

The body is stored exactly as received, under any declared Content-Type, including application/json; multipart/form-data is rejected, because its envelope would be stored as the file. The upload's size is the number of bytes received. Its media type is derived from filename, never from the request's Content-Type. The body is limited to 24 MiB by default, and an environment can configure a different limit. The per-user limit on the total size of open uploads and the expiration apply as to every upload.

Request​

Responses​

The upload was created with its whole content and is ready.

Response Headers
    Cache-Control

    no-store, so no cache answers with an outdated offset.

    Location

    The upload's URL, /api/v1/uploads/{id}.

    Repr-Digest

    Only for a ready upload: the RFC 9530 sha-256 digest of the stored content.

    Tus-Resumable

    The tus protocol version. Every response of an upload operation carries it, Problem responses included, except a 406.

    Upload-Expires

    The upload's expiration time as an HTTP-date.

    Upload-Length

    The upload's declared size in bytes.

    Upload-Metadata

    The filename key with the upload's filename in base64.

    Upload-Offset

    The number of bytes the upload has received and stored, at which the next PATCH continues.