0042-00000212

Updated at:

Problem description

The XML request body of the CompleteMultipartUpload request contains invalid part information.

Causes

You sent a CompleteMultipartUpload request to complete a multipart upload, but the XML in the request body contains incorrect part information. For example, the PartNumber for a part is incorrect and the part cannot be found, or the ETag for a part is incorrect and the verification fails.

Examples

For example, you send the following 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>"xxx"</ETag>
    </Part>  
    <Part> 
        <PartNumber>5</PartNumber>  
        <ETag>"8EFDA8BE206636A695359836FE0A****"</ETag> 
    </Part>  
    <Part> 
        <PartNumber>8</PartNumber>  
        <ETag>"8C315065167132444177411FDA14****"</ETag> 
    </Part> 
</CompleteMultipartUpload>

In the sample request, the error occurs because the ETag value for the first Part is invalid.

Solutions

Ensure that the XML request body follows the required format. The PartNumber and ETag for each part must be correct. The ETag value is returned by the server after you call the UploadPart operation to upload a part. The following code provides an example of a valid 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>

For more information, see The InvalidPart error is reported when you use multipart upload to upload a file to OSS.

References