All Products
Search
Document Center

Object Storage Service:append-object

Last Updated:Jun 22, 2026

Uploads an object by appending data to it incrementally.

Usage notes

  • The final object created by append-object cannot exceed 5 GB.

  • append-object does not support server-side encryption with Key Management Service (KMS) using a specified customer master key (CMK) ID.

Permissions

By default, an Alibaba Cloud account has full permissions. RAM users or RAM roles under an Alibaba Cloud account do not have any permissions by default. The Alibaba Cloud account or account administrator must grant operation permissions through RAM policies or Bucket Policy.

API

Action

Description

AppendObject

oss:PutObject

You can call this operation to upload an object by appending the object to an existing object.

oss:PutObjectTagging

When uploading an object by appending the object to an existing object, if you specify object tags through x-oss-tagging, this permission is required.

Command syntax

ossutil api append-object --bucket value --key value --position value [flags]

Parameter

Type

Description

--body

string

The request body.

--bucket

string

The name of the bucket.

--cache-control

string

The caching behavior for the object.

--content-disposition

string

The display name of the object when downloaded.

--content-encoding

string

The encoding format of the object.

--content-md5

string

The MD5 hash of the object content, used to verify data integrity.

--expires

string

The expiration time.

--key

string

The full path of the object.

--metadata

stringArray

The metadata of the object. Specify custom metadata with parameters prefixed by x-oss-meta-*.

--object-acl

string

The access control list (ACL) of the object.

--position

string

The position from which to start appending data, in bytes.

--server-side-encryption

string

The server-side encryption method.

--storage-class

string

The storage class of the object.

--tagging

string

The tags of the object. You can specify multiple tags. Example: TagA=A&TagB=B.

Note
  • The append-object command corresponds to the AppendObject API operation. For more information about the parameters of the API operation, see AppendObject.

  • For more information about supported global command-line options, see Global command-line options.

Examples

  • Append a string to the object exampleobject.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss"
  • Append data from a file to the object exampleobject.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body file://appendFile
  • Append a string to the object exampleobject with custom metadata.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --metadata user=aliyun --metadata email=ali***@aliyuncs.com
  • Append a string to the object exampleobject with object tags.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --tagging "TagA=A&TagB=B"
  • Append a string to the object exampleobject and set the ACL and storage class.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --object-acl private --storage-class IA
  • Append a string to the object exampleobject with server-side encryption.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --body "hi oss" --server-side-encryption AES256
  • Append a string and set the cache-control behavior for the object.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --cache-control no-cache
  • Append a string and set the download filename for the object.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --content-disposition "attachment;filename=oss_download.jpg"
  • Append a string to the object exampleobject with a Content-MD5 integrity check.

    ossutil api append-object --bucket examplebucket --key exampleobject --position 0 --body "hi oss" --content-md5 ohhnqLBJFiKkPSBO1eNaUA==