Upload the content of a file

Sends the content of a file, or a chunk of it, to an upload created with POST .../upload (tus protocol).

Required role: ORG_VIEWER, for documents only, or ORG_EDITOR. The organization path parameter must be the organization of the access token, and the organization of the upload.

Headers

HeaderRequiredDescription
Tus-ResumableYes1.0.0
Upload-OffsetYesNumber of bytes already sent: 0 for the first chunk, then the Upload-Offset of the previous response
Content-TypeYesapplication/offset+octet-stream

The body is the bytes of the file, from Upload-Offset.

Response

204 with the new Upload-Offset header. When the last byte is received, the file is processed (see POST .../upload).

How to upload a file

Uploads follow the tus 1.0.0 resumable upload protocol: any tus client (such as tus-js-client) can be used, with the access token in its headers.

  1. POST .../upload creates the upload: the response is 201 with its URL in the Location header, .../upload/{fileId}. fileId is the id of the file in this service.
  2. PATCH .../upload/{fileId} sends the content, in one request or in several chunks.
  3. To resume an interrupted upload, HEAD .../upload/{fileId} returns the number of bytes received in Upload-Offset: send the rest from there.

Follow the file with GET .../files/{fileId} (see its status). An upload that isn't completed within 2 days expires.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Id of your organization (must match the access token)

uuid
required

Id of the file: the end of the Location URL returned by POST .../upload

Headers
string
required
Defaults to 1.0.0

tus protocol version: 1.0.0

string
required

Number of bytes already sent: 0 for the first chunk

Responses
204

The bytes were received: the new offset is in the Upload-Offset header (empty body)

404

The upload doesn't exist in organization, or it expired

406

Content-Type is not application/offset+octet-stream

409

Upload-Offset doesn't match the number of bytes already received: get it with HEAD .../upload/{fileId}

412

Tus-Resumable is not 1.0.0

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json