Chunked Upload

Compared with uploading the entire file directly, resumable upload has some more parameter requirements, but has the same return result. At the same time, the uploaded file can also be encrypted.

HTTP Interface:

PUT /chunks

Request Header:

keydescription

Bucket

bucket name

Territory

territory name

Cipher(optional)

cipher

FileName

file name or alias

BlockNumber

The number of chunks the file is to be divided into

BlockIndex

index of chunk to be uploaded, [0,BlockNumber)

TotalSize

the byte size of the file, the sum of the sizes of all chunks

Identity signature required: yes

Request Body:

The file is provided in the form.

keyvalue

file

file[binary]

Request example:

curl -X PUT URL/chunks -F 'file=@test-chunk0;type=application/octet-stream' -H "Bucket: bucket_name" -H "Territory: territory_name" -H "Account: cX..." -H "Message: ..." -H "Signature: 0x... -H FileName: test.log -H BlockNumber: 5 -H BlockIndex: 0 -H TotalSize: 1000"

Last updated