files:writePUT URLs, one per part: the client PUTs each part's bytes to its URL (in parallel, retrying a part on its own), keeps the ETag header each PUT returns, and finally calls complete. Nothing passes through the API host. Parts are part_size bytes each except the last; the default 16 MiB keeps a 2 GB file at ~128 parts. URLs are valid for one hour — POST /uploads/{uploadId}/parts signs fresh ones, in pages of up to 1000; the session itself lives 24 hours, after which it is aborted. A name already taken in the folder gets a (1) suffix; version_of_file_id (a file in the same folder, checked here) makes the completed upload the next version of that file.curl --location 'https://api.pibox.com/api/v2/folders//uploads' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"size": 0,
"content_type": "string",
"part_size": 0,
"version_of_file_id": 0
}'{
"object": "upload",
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"folder_id": 0,
"name": "string",
"size": 0,
"part_size": 0,
"part_count": 0,
"content_type": "string",
"version_of_file_id": 0,
"status": "pending",
"file_id": 0,
"created_at": "2019-08-24T14:15:22.123Z",
"expires_at": "2019-08-24T14:15:22.123Z",
"finished_at": "2019-08-24T14:15:22.123Z",
"parts": [
{
"part_number": 0,
"url": "http://example.com",
"expires_at": "2019-08-24T14:15:22.123Z"
}
],
"uploaded_parts": [
{
"part_number": 0,
"etag": "string",
"size": 0
}
],
"missing_parts": [
0
]
}
}