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
- 201
- 400
- 401
- 403
- 406
- 409
- 412
- 413
- 500
- 503
The upload was created with its whole content and is ready.
Response Headers
no-store, so no cache answers with an outdated offset.
The upload's URL, /api/v1/uploads/{id}.
Only for a ready upload: the RFC 9530 sha-256 digest of the stored content.
The tus protocol version. Every response of an upload operation carries it, Problem responses included, except a 406.
The upload's expiration time as an HTTP-date.
The upload's declared size in bytes.
The filename key with the upload's filename in base64.
The number of bytes the upload has received and stored, at which the next PATCH continues.
The request is invalid (invalid_request): filename is missing or invalid, the body is empty or a multipart/form-data envelope, or a digest header is malformed. Or the body does not match a declared digest (digest_mismatch). No upload was created.
The authentication credential is invalid or has expired (unauthorized).
The request has no authentication credential, or the user is not allowed to use the API (forbidden).
The request does not accept any representation the operation can produce (not_acceptable).
The caller's open uploads with this one would exceed their maximum total size (upload_limit_reached). No upload was created.
The Tus-Resumable request header names a tus protocol version other than 1.0.0 (unsupported_protocol_version). The request had no effect.
Response Headers
The tus protocol version. Every response of an upload operation carries it, Problem responses included, except a 406.
The tus protocol versions the server supports.
The request content exceeds a size limit (payload_too_large).
An unexpected server error occurred (internal_error).
The service is temporarily unavailable, for example while it restarts (service_unavailable). Retry the request later.