Enables reliable upload of large files up to 1 GB to ClickHelp Storage. This method supports pause/resume functionality and progress tracking, making it suitable for large files or unstable network connections.
The upload process consists of two sequential steps:
- Initialization – a single request that starts the upload.
- Chunk upload – several requests, each sending a piece of the file. The maximum size of one chunk is 10 MB. Chunks are uploaded sequentially until the entire file is transferred.
Step 1 - Start the file upload
POST storage/{file-path}?format={file-encode-format}&isOverwrite={is-overwrite}
Authentication
This request requires basic authentication.
Request Parameters
Path params
| file-path |
string
|
File path relative to the root, i.e., everything after ...resources/Storage/. |
|---|
Query params
| format | string | File encoding. Only resumable is supported. |
|---|---|---|
| isOverwrite | bool | [optional] Whether to overwrite an existing file. false by default. |
Samples
Request sample
Bash (Unix Shell) |
[Bash (Unix Shell)] curl --location -g --request POST 'https://{portal-url}/api/v1/storage/manual.docx?format=resumable&isOverwrite=true' |
Request and Response bodies are empty for this method.
Step 2 - Upload file chunks
PUT storage/{file-path}?format={file-encode-format}
Authentication
This request requires basic authentication.
Request Parameters
Path params
|
file-path
|
string
|
The same path that was specified when initializing the upload at Step 1. |
|---|
Query params
| format | string | Only resumable. |
|---|
Request Headers
| Content-Range |
string
|
Specifies the byte range of the current chunk and total file size. Format: bytes {start}-{end}/{total} or bytes {start}-{end}/* (when total size is unknown). The {start} value must equal the last successfully uploaded byte + 1. For the final chunk, {end} + 1 must equal {total}. Chunks are limited to 10 MB. Example: bytes 0-10485759/52428800. |
|---|
Body params
The request body contains raw bytes of the file chunk (binary data).
Response
| 202 Accepted |
Intermediate response. The chunk was successfully received, but the upload is not yet complete. The response includes a Content-Range header indicating the current progress. If the upload is interrupted (e.g., due to network issues), the server returns a 202 Accepted response and includes a Range header indicating the bytes successfully received: Range: bytes=0-{lastUploadedByte}. Resume the upload from the specified byte. |
|---|---|
|
201 Created
|
Final response. The last chunk was received and the file has been assembled successfully. |
Samples
Request sample
Uploading the first chunk:Bash (Unix Shell) |
[Bash (Unix Shell)] curl --location -g --request PUT 'https://{portal-url}/api/v1/storage/file.zip?format=resumable' \ --header 'Content-Range: bytes 0-10485759/52428800' \ --data-binary @chunk1.bin |
Uploading the last chunk:
Bash (Unix Shell) |
[Bash (Unix Shell)] curl --location -g --request PUT 'https://{portal-url}/api/v1/storage/file.zip?format=resumable' \ --header 'Content-Range: bytes 41943040-52428799/52428800' \ --data-binary @last_chunk.bin |
Response body sample
JSON |
[JSON] { "content": null, "fileFullName": "Storage\\file.zip", "fileName": "manual.docx", "isFolder": false, "modifiedBy": "admin", "modifiedOn": "2025-10-31T09:45:00", "size": 52428800 } |
Response fields
|
content
|
Always null for file uploads.
|
|---|---|
|
fileFullName
|
Path to the file in Storage. |
|
fileName
|
Name of the file. |
|
isFolder
|
Indicates if the object is a folder (false for files).
|
|
modifiedBy
|
User who uploaded the file. |
|
modifiedOn
|
Timestamp of the last modification (ISO 8601 format). |
|
size
|
File size in bytes. |