Upload tus file bytes
Appends raw file bytes at the declared offset of a resumable upload.
{UPLOAD_URL}Use the upload capability URL from the Location header of the successful create-upload response. It does not use ambient API2 host credentials.
This sends file (four bytes) to a fresh upload reserved for four bytes, as shown in
Create a tus upload.
For a resumed transfer, first retrieve the server’s offset and send only the remaining bytes
with that offset. Do not resend the entire file at a nonzero offset.
Omit Upload-Length for a fixed-size upload. Use it only when the upload was
created with Upload-Defer-Length: 1 and the total length has not yet been declared.
The value declares the total file length in bytes, not the size of this PATCH chunk.
Once the total length is declared, omit Upload-Length from subsequent PATCH requests.
Supplying it for an unfinished upload whose length is already known returns HTTP 400.
Request example
Set UPLOAD_URL to the complete Location URL returned when creating the tus upload. Keep this URL secret.
curl --fail-with-body -sS --request PATCH --include \
--url "${UPLOAD_URL:?Set UPLOAD_URL}" \
--header 'upload-offset: 0' \
--header 'content-type: application/offset+octet-stream' \
--header 'tus-resumable: 1.0.0' \
--data-binary 'file'
Request headers
Complete JSON Schema
Normalized lowercase headers for a canonical tus PATCH request.
Fields beyond those listed for this object are accepted.
| Field | Type and description |
|---|---|
content-typerequired | string (always: "application/offset+octet-stream") |
tus-resumablerequired | string (always: "1.0.0")The negotiated tus version. |
upload-length | stringA canonical unsigned base-10 byte count in the signed 64-bit range, without zero padding or a plus sign. Validation pattern (regular expression)^(?:0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$ |
upload-offsetrequired | stringA canonical unsigned base-10 byte count in the signed 64-bit range, without zero padding or a plus sign. Validation pattern (regular expression)^(?:0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$ |
Request body
Binary request body. application/offset+octet-stream
Response
HTTP 204
No response body.
Response headers
Complete JSON Schema
Fields beyond those listed for this object are accepted.
| Field | Type and description |
|---|---|
tus-resumablerequired | string (always: "1.0.0") |
upload-offsetrequired | stringA canonical unsigned base-10 byte count in the signed 64-bit range, without zero padding or a plus sign. Validation pattern (regular expression)^(?:0|[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)$ |
x-content-type-optionsrequired | string (always: "nosniff") |
Error response
Text response body. text/plain; charset=utf-8
Response body schema
Complete JSON Schema
stringAny of the following schemas may apply:
Variant 1: string
stringValidation pattern (regular expression)
^ERR_[A-Z0-9_]+: [^\r\n]*\n$Variant 2: string
stringRaw text/plain hook error framing with a verbatim payload; JSON-shaped but not necessarily valid JSON.
Validation pattern (regular expression)
^\{"error":"(?:[\x09-\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]|[^\x09-\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff])*"\}$Response headers
Complete JSON Schema
Fields beyond those listed for this object are accepted.
| Field | Type and description |
|---|---|
content-typerequired | string (always: "text/plain; charset=utf-8") |
tus-resumablerequired | string (always: "1.0.0") |
x-content-type-optionsrequired | string (always: "nosniff") |