Problem description
The value of the x-oss-meta-client-side-encryption-part-size request header in an UploadPart request is not the expected value.
Causes
When you use client-based encryption, you must include the x-oss-meta-client-side-encryption-part-size request header in your InitiateMultipartUpload request. Subsequent UploadPart requests must include the same header with the same value. This fault occurs if the value in an UploadPart request does not match the value specified in the InitiateMultipartUpload request.
Examples
For example, you send 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-part-size: 1000Then, you send an UploadPart request:
PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC9**** HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 2000
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-part-size: 2000
[2000 bytes data]The request fails because the value of the x-oss-meta-client-side-encryption-part-size header in the UploadPart request does not match the value specified in the InitiateMultipartUpload request.
Solution
Ensure that the value of the x-oss-meta-client-side-encryption-part-size header in your UploadPart request matches the value specified in your InitiateMultipartUpload request.