Appending Data to an Object
The AppendObject operation adds data to the end of an object in a specified bucket. If there is no namesake object in the bucket, a new object is created. The object created using the AppendObject operation is an appendable object, and the object uploaded using the PUT operation is a normal object. Objects uploaded by users are stored in buckets. Only the users who have the write permission can upload objects to buckets. The name of each object in a bucket must be unique. To ensure that data is not damaged during transmission, you can add the Content-MD5 parameter to the request header. After receiving the data, OBS performs MD5 verification for the data. If the data is inconsistent, OBS returns an error message. This operation allows you to specify the x-obs-acl parameter when creating an appendable object and set the permission control policy for the object. This operation supports server-side encryption.
Relationship with other operations:
1. If you perform the PUT operation on an existing appendable object, the appendable object is overwritten by the newly uploaded object and the object type changes to normal. If you perform the other way around, an error occurs.
2. An appendable object will be changed to a normal object after being copied. An appendable object cannot be copied and saved as an appendable object.
1. The last modification time of the object is updated each time an appending upload is performed.
2. If the SSE-C encryption mode is used on the server side, the appending upload is the same as the initialization segment. In this case, the request headers such as x-obs-server-side-encryption must be carried.
3. For the server-side encryption (SSE-KMS), the request header such as x-obs-server-side-encryption is specified only when the file is uploaded for the first time and no object with the same name exists in the bucket.
The format of an AppendObject request is as follows:
POST /ObjectName?append&position=Position HTTP/1.1 Host: bucketname.obs.cn-north-4.myhuaweicloud.com Content-Type: application/xml Content-Length: length Authorization: authorization Date: date <Optional Additional Header> <object Content>
Last Article: Multipart Upload
Next Article: Permission Control
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.