Skip to main content

Create a resumable upload session

POST 

/v1/storages/upload/resumable

Creates a resumable upload session based on the TUS protocol, suitable for multipart upload of large files and resumable uploads. On success, the Location response header returns the upload session URL, which is used for subsequent chunk uploads (PATCH), progress queries (HEAD), or termination (DELETE).

Protocol notes:

  • The Tus-Resumable: 1.0.0 request header is required;
  • Declare the total file size via Upload-Length, or defer it with Upload-Defer-Length: 1 (declared later in a PATCH request). It is recommended to use Upload-Length whenever possible;
  • Pass object information via Upload-Metadata, where bucketName and objectName are required;
  • The first chunk can be sent along with the creation request (Content-Type: application/offset+octet-stream);
  • After the last chunk is uploaded, the response carries the Tus-Complete: 1 header and the object is written to storage.

Request​

Responses​

Created successfully, no response body

Response Headers
    Location

    Upload session URL, used by subsequent PATCH/HEAD/DELETE requests

    Tus-Resumable

    TUS protocol version

    Upload-Expires

    Expiration time of an unfinished session (RFC 1123 format)

    Cache-Control

    Gateway cache control

    X-Request-Id

    Gateway request ID, useful for log searches