0026-00000017

更新时间:
复制 MD 格式

Problem description

The destination object for an AppendObject request is not an appendable object.

Cause

You sent an AppendObject request for an object that is not an appendable object.

Problem examples

For example, you sent the following request:

POST /example.log?append&position=6 HTTP/1.1
Content-Length: ContentLength
Content-Type: ContentType
Host: bucketname.oss.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

If the `example.log` object is not an appendable object, the request fails and returns this error.

Solution

You can send a HeadObject request to check whether the object is appendable:

HEAD /example.log HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Fri, 03 Feb 2023 05:57:00 GMT
Authorization: OSS qn6q**************:77Dv****************

The following response is returned for an appendable object:

HTTP/1.1 200 OK
Date: Fri, 03 Feb 2023 05:57:16 GMT
Content-Type: application/octet-stream
Content-Length: 4 
Connection: keep-alive
x-oss-request-id: 63DCA23C5B537C30327581DB
Accept-Ranges: bytes
ETag: A5750CC1A7FD15****A2DC6300000000
Last-Modified: Fri, 03 Feb 2023 05:57:16 GMT
x-oss-object-type: Appendable
x-oss-hash-crc64ecma: 18020588380933092773
x-oss-next-append-position: 4
x-oss-storage-class: Standard

The x-oss-object-type response header indicates that the object is appendable. The x-oss-next-append-position response header indicates that the position parameter for the next AppendObject request must be 4.

Related documents