All Products
Search
Document Center

Object Storage Service:0042-00000214

Last Updated:Apr 28, 2024

Problem description

An object that has the same name as the one you want to upload in parts already exists.

Causes

The x-oss-forbid-overwrite=true header is specified in the CompleteMultipartUpload request, and an existing object has the same name as the object you want to upload.

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-forbid-overwrite: true
<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 x-oss-forbid-overwrite header in the sample request is set to true to disable overwrites of an existing object that has the same name.

Solutions

If you want to overwrite an existing object that has the same name, delete the x-oss-forbid-overwrite header from the request or set the header to false.

References