The appendfromfile command is used to upload local file content to an appendable object in OSS.

Note For more information about append upload, see Append upload.

Command syntax

 ./ossutil appendfromfile local_file_name oss://bucket/object [--meta=meta-value] [--payer requester] 
If the appendable object does not exist, you can use the --meta option to configure the object metadata, such as --meta "X-Oss-Meta-Author:test". The --meta option cannot be used to append content to an object that already exists.
Notice
  • You must specify the name for objects uploaded using append upload.
  • You can only append content to objects created using append upload.
  • You can use the set-meta command to modify the metadata of an object.

Examples

Upload an object by using append upload.
./ossutil appendfromfile /file/test.txt oss://bucket1/test.txt 
total append 64(100.00%) byte,speed is 0.00(KB/s)
local file size is 64,the object new size is 64,average speed is 0.34(KB/s)

Common options

The following table describes the options you can add to the appendfromfile command.
Option Description
--meta Configures the metadata of a specified object. The --meta option cannot be used to append content to an object that already exists.
--maxupspeed Specifies the maximum upload speed. Unit: KByte/s. Default value: 0 (unlimited).
--encoding-type Specifies the encoding type of the object name. If this option is specified, this value must be url. If this option is not specified, the object name is not encoded. Bucket names cannot be URL-encoded.
--loglevel Specifies the log level. The default value is null, indicating that no log files are generated. Valid values:
  • info: generates prompt logs.
  • debug: generates detailed logs that contain HTTP requests and responses.
--payer Specifies the payer of the request. You can set this option to requester to enable the pay-by-requester mode.
--proxy-host Specifies the URL of the proxy server. HTTP, HTTPS, and SOCKS5 proxies are supported. An example of the URL is http://120.79. **.**:3128 or socks5://120.79. **. **:1080.
--proxy-user Specifies the username of the proxy server. The default value is null.
--proxy-pwd Specifies the password of the proxy server. The default value is null.
Note For more information about common options, see View all supported options.