0042-00000302
Updated at:
Problem description
The value of the x-oss-copy-source request header in an UploadPartCopy request is empty.
Cause
The UploadPartCopy operation uploads a part by copying data from an existing object. The x-oss-copy-source parameter specifies the copy source. This error occurs because the parameter value is empty. The parameter must be in the format /oss-example/src-object or /oss-example/src-object?versionId=CAEQMxiBgMC0vs6D0BYiIGJiZWRjOTRjNTg0NzQ1MTRiN2Y1OTYxMTdkYjQ0****. Use the latter format to specify a version of the object.
Example
The following request is an example:
PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC98E36 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-copy-source:
x-oss-copy-source-range:bytes=100-6291756
The request fails because the x-oss-copy-source parameter is an empty string and is not in the required format.
Solution
Ensure that the x-oss-copy-source request header is in the correct format. For example:
PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC98E36 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-copy-source: /oss-example/src-object
x-oss-copy-source-range:bytes=100-6291756
References
Is this page helpful?