Upload part of file
Changed onUploads a chunk of a file for an upload session.
The actual endpoint URL is returned by the Create upload session and Get upload session endpoints.
Request
- Base URLhttps://upload.box.com/api/2.0
- URLhttps://upload.box.com/api/2.0/files/upload_sessions/{upload_session_id}
- AuthOAuth 2Authorization code: https://account.box.com/api/oauth2/authorizeToken URL: https://api.box.com/oauth2/token
Path parameters
The ID of the upload session.
Headers
The RFC3230 message digest of the chunk uploaded.
SHA-1 and SHA-512 (RFC5843) are supported. The digest must be base64 encoded. The format of this header is as sha=BASE64_ENCODED_DIGEST for SHA-1, or sha-512=BASE64_ENCODED_DIGEST for SHA-512.
To get the value for the digest, use the openSSL command to encode the file part: openssl sha1 -binary <FILE_PART_NAME> | base64 for SHA-1, or openssl sha512 -binary <FILE_PART_NAME> | base64 for SHA-512.
The byte range of the chunk.
Must not overlap with the range of a part already uploaded this session. Each part’s size must be exactly equal in size to the part size specified in the upload session that you created. One exception is the last part of the file, as this can be smaller.
When providing the value for content-range, remember that:
- The lower bound of each part's byte range must be a multiple of the part size.
- The higher bound must be a multiple of the part size - 1.
Request body application/octet-stream
The binary content of the file.
Response
Chunk has been uploaded successfully.
The response always includes sha512. It also includes sha1 if the Digest header used SHA-1.
Example response
{
"part": {
"part_id": "6F2D3486",
"offset": 16777216,
"size": 3222784,
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
"sha512": "ae78a0ca28abffe70ac9aba830556cd6eb3fcf1501dbd9b2d7a5f45992c00812cb07b51bbd0a9174e2295671c0e86f30354afa91d281d4fbee6a323a483d6383"
}
}Changes
- warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status - warning
added the new
unprocessable_entityenum value to theresponse property for the response status - info
added the optional property
//to the response with the status
- warning