All Products
Search
Document Center

Object Storage Service:0042-00000214

Last Updated:Mar 20, 2026

Problem description

A CompleteMultipartUpload request fails because x-oss-forbid-overwrite: true is set in the request and an object with the same name already exists in the bucket.

Causes

The x-oss-forbid-overwrite header prevents overwrites of existing objects. When set to true, OSS rejects any CompleteMultipartUpload request that would replace an existing object and returns this error instead of completing the upload.

Examples

The following request fails because multipart.data already exists in the bucket:

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>

Solutions

To allow the upload to overwrite the existing object, remove the x-oss-forbid-overwrite header from the CompleteMultipartUpload request, or set it to false.

References