All Products
Search
Document Center

Object Storage Service:upload-part

Last Updated:Mar 20, 2026

Uploads one part of a multipart upload to OSS, using the object name and upload ID to identify the target upload.

Prerequisites

Before you begin, ensure that you have:

  • An upload ID obtained by calling InitiateMultipartUpload

  • The oss:PutObject permission on the target bucket, granted via RAM Policy or Bucket Policy

Syntax

ossutil api upload-part --bucket <value> --key <value> --upload-id <value> --part-number <value> --body <value> [flags]
ParameterTypeRequiredDescription
--bucketstringYesName of the bucket.
--keystringYesFull path of the object.
--upload-idstringYesID of the multipart upload task.
--part-numberstringYesNumber that identifies the part.
--bodystringYesThe request body which must carry complete data of a single part. Cannot be blank.
Note

For all supported global flags, see Command-line options.

Usage notes

  • Call InitiateMultipartUpload before calling upload-part to get an upload ID.

  • Each part number uniquely identifies a part.

  • Uploading a new part with the same part number overwrites the previously uploaded part with that number.

  • OSS returns the MD5 hash of each received part in the ETag response header.

Permissions

Alibaba Cloud accounts have full permissions by default. RAM users and RAM roles have no permissions by default and must be granted access via RAM Policy or Bucket Policy.

APIActionDescription
UploadPartoss:PutObjectUploads parts.

For more information, see the UploadPart API reference.

Example

Upload the first part of an object:

ossutil api upload-part --bucket examplebucket --key exampleobject --upload-id 123 --part-number 1 --body file://partFile