Upload a temporary file
Upload a file for temporary storage.
To upload a file, you need to generate its UUID and pass it as the
hash request parameter. It will be used as the file body ID.
You can upload a file in full or in parts. To upload the whole file, pass the
Content-Range header with the value
bytes 0-[size]/[size] (for example,
To upload a file in parts, you need to divide it. All parts must be of equal size, except for the last one. The size of the main parts must be between 5 MB (5 242 880 B) and 5 GB (5 368 709 120 B). The remaining part can be of any size.
To inform the server which of the parts is being uploaded, you need to pass the
Content-Range header. It is set by the following template:
bytes [range-start]-[range-end]/[size]. For example, to upload a 7 MB file, you’d need tp pass the following headers:
bytes 0-5242880/7340032 for the first 5 MB part of the file and
bytes 5242880-7340032/7340032 for the remaining part.
Then you need to initialize the file. Otherwise, it will be deleted as unneeded. A temporary file is stored in the system for 60 minutes. You can initialize it using the
/disk/file/move endpoint, moving it to a directory or saving within an app.
Content-Type header must have the value
application/octet-stream. In the request body, binary data is passed.
Hash of the file that is going to be uploaded in parts
This request requires the use of one of following authorisation methods:
The following HTTP status codes may be returned:
The file is fully uploaded
Part of the file is successfully uploaded
The error is shown as a message that describes the problem. The error message may contain the following codes:
Response after one of the file parts is uploaded
|Response after one of the file parts is uploaded (Upload a temporary file)|