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
| Header | Required | Description |
|---|---|---|
Tus-Resumable | Yes | 1.0.0 |
Upload-Offset | Yes | Number of bytes already sent: 0 for the first chunk, then the Upload-Offset of the previous response |
Content-Type | Yes | application/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.
POST .../uploadcreates the upload: the response is201with its URL in theLocationheader,.../upload/{fileId}.fileIdis the id of the file in this service.PATCH .../upload/{fileId}sends the content, in one request or in several chunks.- To resume an interrupted upload,
HEAD .../upload/{fileId}returns the number of bytes received inUpload-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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
204The bytes were received: the new offset is in the Upload-Offset header (empty body)
404The upload doesn't exist in organization, or it expired
406Content-Type is not application/offset+octet-stream
409Upload-Offset doesn't match the number of bytes already received: get it with HEAD .../upload/{fileId}
412Tus-Resumable is not 1.0.0