Appends content to the end of an appendable object.
Usage notes
To perform an append upload, you must have the
oss:GetObject
andoss:PutObject
permissions. For more information, see Attach a custom policy to a RAM user.For more information about append uploads, see Append upload.
If the specified object does not exist, the command creates an appendable object. If the object exists but is not appendable, the command returns an error.
Command syntax
ossutil append source oss://bucket/object [flags]
Parameter | Type | Description |
source | string | The data source. You can specify a local path, OSS path, or If you specify |
--acl | string | The access control list (ACL) of the object. Valid values:
|
--cache-control | string | Specifies the caching behavior in web browsers when the object is downloaded. |
--content-disposition | string | The display mode for the object. |
--content-encoding | string | The encoding method of the object. |
--content-type | string | The content type of the object. |
--encoding-type | string | The encoding method of the object name or file name. Valid values: url. |
--expires | string | The absolution expiration time of the cached content. |
--metadata | strings | The user metadata of the object in the format of key=value pairs. |
--request-payer | string | The payer of the request. If pay-by-requester is enabled for the bucket, set this parameter to requester. Valid value: requester. |
--storage-class | string | The storage class of the object. Valid values:
|
--tagging | strings | The object tags in the format of key=value pairs. |
For more information, see Command-line options.
Examples
Upload the 1.txt file from the local directory to the bucket, with the object ACL set to private and the tag=value tag added to the object.
ossutil append 1.txt oss://dst-bucket/append.txt --acl private --tagging tag=value
Append the content of 2.txt to the end of the append.txt object by using the standard input.
cat 2.txt | ossutil append - oss://dst-bucket/append.txt
Append the content of 3.txt in bucket src-bucket to the end of the append.txt object.
ossutil append oss://src-bucket/3.txt oss://dst-bucket/append.txt