Problem description
In a client-side encryption scenario, the number of parts calculated for an InitiateMultipartUpload or UploadPart request exceeds the allowed limit.
Causes
In a client-side encryption scenario, the estimated number of parts for an InitiateMultipartUpload or UploadPart request is calculated by dividing the value of the x-oss-meta-client-side-encryption-data-size request header by the value of the x-oss-meta-client-side-encryption-part-size request header. The result cannot exceed 10,000.
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-key: val0
x-oss-meta-client-side-encryption-start: val1
x-oss-meta-client-side-encryption-cek-alg: val2
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-magic-number-hmac: val4
x-oss-meta-client-side-encryption-data-size: 200000
x-oss-meta-client-side-encryption-part-size: 10The estimated number of parts is 200,000 divided by 10, which is 20,000. Because this number exceeds the 10,000-part limit, the request fails.
Solution
In client-side encryption scenarios, when you make an InitiateMultipartUpload or UploadPart request, ensure that the value of the x-oss-meta-client-side-encryption-data-size header divided by the value of the x-oss-meta-client-side-encryption-part-size header does not exceed 10,000.