Problem description
The value of the x-oss-meta-client-side-encryption-start
header in the UploadPart request in client-side encryption scenarios is different from the expected number of parts that is calculated by OSS based on the InitiateMultipartUpload request.
Causes
The value of the x-oss-meta-client-side-encryption-start
header specified in the UploadPart request is not the same as the value of the header specified in the InitiateMultipartUpload request.
Examples
For example, you initiate the InitiateMultipartUpload request:
POST /multipart.data?uploads HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 22 Feb 2012 08:32:21 GMT
x-oss-storage-class: Archive
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-start: value1
Then, you initiate the UploadPart request:
PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC9**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-start: value2
[6291456 bytes data]
The error is returned for the UploadPart request because you do not set the x-oss-meta-client-side-encryption-start
header to the same value in the InitiateMultipartUpload request and UploadPart request.
Solutions
Make sure that you set the x-oss-meta-client-side-encryption-start
header to the same value in the InitiateMultipartUpload request and UploadPart request.