Source Code Bundles
Uploads one part of a large file to B2, using an file ID obtained
Once all of the parts are uploaded, use
If you upload the same part number for the same file more than once, both uploads will succeed, and the second upload will overwrite the first.
The upload request is a POST. The file name and other parameters are in the request headers, and the file to be uploaded is the request body.
Request HTTP Headers
An upload authorization token, from
A number from 1 to 10000. The parts uploaded for one file must have contiguous numbers, starting with 1.
The number of bytes in the file being uploaded. Note that this
header is required; you cannot leave it out and just use chunked
The SHA1 checksum of the this part of the file. B2 will check this
when the part is uploaded, to make sure that the data arrived
Request HTTP Message Body Parameters
There are no JSON parameters allowed. The file to be uploaded is the message body and is not encoded in any way. It is not URL encoded. It is not MIME encoded.
Response HTTP Status 200
File part successfully uploaded. The JSON response will contain:
The unique ID for uploading this file.
Which part this is.
The number of bytes stored in the part.
The SHA1 of the bytes stored in the part.
File not uploaded.
If possible the server will return a JSON error structure. Errors include: