Append upload content
PATCH/api/v1/uploads/:id
Appends the body to the upload with the tus 1.0.0 core protocol. Upload-Offset must equal the number of bytes the upload has received, which HEAD reports. A single request at offset 0 with the whole file is the non-resumable form. A body is limited to 24 MiB by default, the default declared-size limit, and an environment can configure a different limit; a client of a larger limit chooses a smaller chunk size. The request that appends the last declared byte makes the upload ready, after which it accepts no further bytes; content cannot be replaced. Concurrent requests to one upload are applied one at a time, and a request whose offset a preceding one has made stale is rejected with 409. A rejected request appends nothing. When the received bytes can no longer be appended to, because an earlier request failed after storing its bytes, the upload is reset: its received bytes are discarded, the request is rejected with 409, and HEAD reports offset 0, from which the client sends the content again.
Request
Responses
- 204
- 400
- 401
- 403
- 404
- 406
- 409
- 412
- 413
- 415
- 500
- 503
The body was appended. The response has no body.
Response Headers
no-store, so no cache answers with an outdated offset.
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): Upload-Offset is missing or malformed, or a digest header is malformed, has no value of an algorithm it accepts (sha-256 for Content-Digest, sha-256 or sha-512 for Repr-Digest), or differs from the declared one. Or the content does not match a declared digest (digest_mismatch): for Content-Digest, nothing is appended; for the whole-file Repr-Digest, checked by the request that completes the upload, the upload is deleted.
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 addressed resource does not exist, or no route matches the request method and path (not_found).
The request does not accept any representation the operation can produce (not_acceptable).
Upload-Offset differs from the number of bytes the upload has received, or the upload was reset because its received bytes could no longer be appended to (offset_mismatch). Nothing was appended; send HEAD to get the current offset, which is 0 after a reset.
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).
The request's Content-Type is not supported by this operation (unsupported_media_type).
An unexpected server error occurred (internal_error).
The service is temporarily unavailable, for example while it restarts (service_unavailable). Retry the request later.