问题描述
客户端加密场景下InitiateMultipartUpload、UploadPart根据请求头计算出的分片数量超出限制。
问题原因
客户端加密场景下,在InitiateMultipartUpload、UploadPart时,预估分片数目为请求头x-oss-meta-client-side-encryption-data-size
的值与请求头x-oss-meta-client-side-encryption-part-size
的值的比值,预估分片数目不能超过10000。
问题示例
例如您发起了一个InitiateMultipartUpload请求:
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: 10
预估分片数目为200000/10 = 20000,超过了10000个分片的限制,请求返回失败。
解决方案
客户端加密场景下,进行InitiateMultipartUpload、UploadPart时,请求头x-oss-meta-client-side-encryption-data-size
值与请求头x-oss-meta-client-side-encryption-part-size
值的比值不能超过10000。
相关文档
文档内容是否对您有帮助?