Skip to main content

TUS create file upload

A request to create new file upload.

note

[Since 2022.04]

POST /api/v1/files/uploadResumable HTTP/1.1
  1. Example request
curl 'http://localhost:8080/api/v1/files/uploadResumable' –I \
-X POST \
-H 'X-co-auth-token: d4df686556681a2e31243405cf859d9a' \
-H 'X-FS-Token: f4b2adc9b1926479434d560ca155679c' \
-H 'Tus-Resumable: 1.0.0' \
-H 'Upload-Length: 20' \
-H 'Upload-Metadata: fsToken
ZjRiMmFkYzliMTkyNjQ3OTQzNGQ1NjBjYTE1NTY3OWM=,metaParams
eyJmaWxlbmFtZSI6InRlc3RmaWxlLnR4dCIsIm1lZGlhVHlwZSI6InRleHQvcGxhaW4iLCJwYXJlbnRJZCI6Im
YwZTJhOGI4LTg2NjYtNGRjZC04ODk0LTQzY2IzN2Q1NWQwMCJ9' \
-H 'metadata:
{"filename":"testfile.txt","mediaType":"text/plain","parentId":"f0e2a8b8-8666-4dcd-
8894-43cb37d55d00"}'\
-d 'convert=false&conflictStrategy=keep_both&synchronous=true'
  1. Request headers
ParameterDescription
Upload-MetadataMetadata of upload.
Tus-ResumableVersion of the protocol.
Upload-LengthIndicates the size of the entire upload in bytes.
  1. Response headers
ParameterDescription
Tus-ResumableVersion of the protocol.
LocationPath to load content.
  1. Example response
HTTP/1.1 201 Created
X-co-request-id: 4e4a3241613649357766394b6e355743
Tus-Resumable: 1.0.0
Location: /api/v1/files/uploadResumable/fbca054e-9052-4110-8d10-79e1dccb592f