Problem description
In a client-based encryption scenario, the value of the x-oss-meta-client-side-encryption-data-size request header in an UploadPart request is not the expected value.
Causes
The value of the x-oss-meta-client-side-encryption-data-size request header in the UploadPart request does not match the value of the same header in the InitiateMultipartUpload request.
Examples
For example, you initiate an 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-data-size: 10000Then, you initiate an 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-data-size: 20000
[6291456 bytes data]The request failed because the value specified for the x-oss-meta-client-side-encryption-data-size request header is invalid.
Solutions
In the UploadPart request, ensure that the x-oss-meta-client-side-encryption-data-size request header has the same value as that in the InitiateMultipartUpload request.
References
该文章对您有帮助吗?