Initializing Multipart Upload

Last Updated At: 2025-10-21 09:10:00

Description

The Initiate Multipart Upload API request initializes shard upload, and upon successful execution, it returns an UploadId for subsequent Upload Part requests.

Request

Request Example

POST /<ObjectKey>?uploads HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String

Note:

Authorization: Auth String (For details, please refer to the Request Signature document).

Request Header

Common Headers

The implementation of this request operation uses common request headers. For details on common request headers, please refer to the Common Request Headers document.

Non-common Headers

Recommended headers:
This request is implemented by using the following recommended request headers.

Name Description Type Required
Cache-Control Cache policy defined in RFC 2616. It is saved as object metadata. String No
Content-Disposition File name defined in RFC 2616. It is saved as object metadata. String No
Content-Encoding Encoding format defined in RFC 2616. It is saved as object metadata. String No
Content-Type Content type (MIME) defined in RFC 2616. It is saved as object metadata. String No
Expires The file date and time defined in RFC 2616 will be saved as Object metadata. String No
x-cos-meta-* Including user-defined header suffixes and user-defined header information will be returned as Object metadata, with a size limit of 2 KB.
Note: User-defined header information supports underscores, but user-defined header suffixes do not support underscores.
String No

Permission related header

Note:

For more information on ACL requests, please refer to the ACL Overview document.

Name Description Type Required
x-cos-acl Defines the ACL property of the Object, with valid values: private, public-read, default; Default value: default (inherits Bucket permissions).
Note: The current access policy entry limit is 1000 entries. If you do not need to control Object ACLs, please fill in default or leave this item unset, which will default to inheriting Bucket permissions.
String No
x-cos-grant-read Grants the grantee read permission, format: x-cos-grant-read: id="[OwnerUin]" String No
x-cos-grant-full-control Grants the grantee full control permission, format: x-cos-grant-full-control: id="[OwnerUin]" String No

Request Body

The request operation's request body is empty.

Response

Response Headers

Common Response Headers

This response uses common response headers. For details, see Common Response Headers.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:

<InitiateMultipartUploadResult>
    <Bucket>examplebucket-1250000000</Bucket>
    <Key>exampleobject</Key>
    <UploadId>1484727270323ddb949d528c629235314a9ead80f0ba5d993a3d76b460e6a9cceb9633b08e</UploadId>
</InitiateMultipartUploadResult>

The data are as follows:

Node Name (Keyword) Parent Node Description Type
InitiateMultipartUploadResult No Description of all returned information Container

Content of the Container node InitiateMultipartUploadResult:

Node Name (Keyword) Parent Node Description Type
Bucket InitiateMultipartUploadResult Target Bucket for multipart upload, consisting of a user-defined string and a system-generated APPID digit string connected by a hyphen, for example: examplebucket-1250000000 Container
Key InitiateMultipartUploadResult Name of an object. Container
UploadId InitiateMultipartUploadResult ID to use in subsequent uploads. Container

Practical Case

Request

POST /exampleobject?uploads HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: Fri, 10 Mar 2016 09:45:46 GMT
Authorization: q-sign-algorithm=sha1&q-ak=AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&q-sign-time=1484727259;32557623259&q-key-time=1484727259;32557623259&q-header-list=host&q-url-param-list=uploads&q-signature=b5f46c47379aeaee74be7578380b193c01b28045

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 230
Connection: keep-alive
Date: Fri, 10 Mar 2016 09:45:46 GMT
x-cos-request-id: NTg3ZjIzZTZfOWIxZjRlXzZmMzhfMWRj

<InitiateMultipartUploadResult>
    <Bucket>examplebucket-1250000000</Bucket>
    <Key>exampleobject</Key>
    <UploadId>1484727270323ddb949d528c629235314a9ead80f0ba5d993a3d76b460e6a9cceb9633b08e</UploadId>
</InitiateMultipartUploadResult>