All Products
Search
Document Center

Object Storage Service:0005-00000411

Last Updated:Apr 29, 2024

Problem description

In client-side encryption scenarios, the number of parts that is specified in the CompleteMultipartUpload request is different from the expected number of parts that is calculated by OSS based on the InitiateMultipartUpload request.

Causes

The number of parts specified in the CompleteMultipartUpload request exceeds the number of parts calcuated based on the size of the data that you want to upload and the part size specified in the InitiateMultipartUpload request.

Examples

For example, you initiate the InitiateMultipartUpload request, in which the size of the data that you want to upload is 1,000,000B and the part size is 500,000B:

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: 1000000
x-oss-meta-client-side-encryption-part-size: 500000

The estimated number of parts in the multipart upload task is 2. Then, you specify 3 as the number of parts in the CompleteMultipartUpload request:

POST /multipart.data?uploadId=0004B9B2D2F7815C432C9057C031****&encoding-type=url HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 1056
Date: Fri, 24 Feb 2012 10:19:18 GMT
Authorization: OSS qn6q**************:77Dv****************
<CompleteMultipartUpload> 
    <Part> 
        <PartNumber>1</PartNumber>  
        <ETag>"3349DC700140D7F86A0784842780****"</ETag> 
    </Part>  
    <Part> 
        <PartNumber>5</PartNumber>  
        <ETag>"8EFDA8BE206636A695359836FE0A****"</ETag> 
    </Part>  
    <Part> 
        <PartNumber>8</PartNumber>  
        <ETag>"8C315065167132444177411FDA14****"</ETag> 
    </Part> 
</CompleteMultipartUpload>

The error is returned for the CompleteMultipartUpload request because the number of parts specified in the CompleteMultipartUpload request exceeds the expected number of parts.

Solutions

  1. Make sure the number of parts specified in the CompleteMultipartUpload request is not greater than the expected number of parts.

  2. Change the data size and part size in the InitiateMultipartUpload request to allow a larger number of parts in the CompleteMultipartUpload request.

References