0042-00000216
Problem description
If the x-oss-complete-all header is set to yes in the CompleteMultipartUpload request, the request body is not allowed.
Causes
The x-oss-complete-all header in the CompleteMultipartUpload request is set to yes and the XML request body is configured for the request.
Examples
For example, you initiate 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****************
x-oss-complete-all: yes
<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>
If the x-oss-complete-all header is set to yes, Object Storage Service (OSS) lists all parts that are uploaded by using the current upload ID, sorts the parts by their part numbers, and then performs the CompleteMultipartUpload operation. The error is returned for the sample request because the x-oss-complete-all header is set to yes and the request body is configured for the request.
Solutions
If you want OSS to list all parts that are uploaded by using the current upload ID, sort the parts by their part numbers, and then perform the CompleteMultipartUpload operation, set the x-oss-complete-all header to yes and do not include the request body, as shown in the following sample 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****************
x-oss-complete-all: yes