CompleteMultipartUpload

Prev Next

Available in Classic and VPC

You can complete a multipart upload by assembling the uploaded parts.
After you upload all the parts via the InitiateMultipartUpload API and the UploadPart API, call the applicable API to complete the upload process.

Requests

The following describes the request format for the endpoint. The request format is as follows.

Method URI
POST /{bucket-name}/{object-name}

Request syntax

The request syntax is as follows.

POST https://{endpoint}/{bucket-name}/{object-name}?uploadId={uploadId} # path style
POST https://{bucket-name}.{endpoint}/{object-name}?uploadId={uploadId} # virtual host style
<CompleteMultipartUpload>
  <Part>
    <PartNumber>{sequential part number}</PartNumber>
    <ETag>{ETag value from part upload response header}</ETag>
  </Part>
</CompleteMultipartUpload>

Request headers

For headers common to all Object Storage APIs, see Object Storage common headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
bucket-name String Required Name of the bucket where the object is stored
object-name String Required Name of the object that ran the multipart upload

Request query parameters

The following describes the parameters.

Field Type Required Description
uploadId String Required Upload ID received by running the InitiateMultipartUpload API

Request example

The following is a sample request.

POST /some-bucket/multipart-object-123?uploadId=0000015a-df89-51d0-2790-dee1ac994053 HTTP/1.1
Authorization: {authorization-string}
x-amz-date: 20170318T035641Z
Content-Type: text/plain; charset=utf-8
Host: kr.object.ncloudstorage.com
Content-Length: 257
<CompleteMultipartUpload>
  <Part>
    <PartNumber>1</PartNumber>
    <ETag>"7417ca8d45a71b692168f0419c17fe2f"</ETag>
  </Part>
  <Part>
    <PartNumber>2</PartNumber>
    <ETag>"7417ca8d45a71b692168f0419c17fe2f"</ETag>
  </Part>
</CompleteMultipartUpload>

Responses

The following describes the response format.

Response headers

For response headers common to all Object Storage APIs, see Object Storage common response headers.

Response status codes

For response status codes common to all Object Storage APIs, see Object Storage response status codes.

Response example

The following is a sample response.

HTTP/1.1 200 OK
Date: Fri, 03 Mar 2017 19:18:44 GMT
Accept-Ranges: bytes
ETag: "765ba3df36cf24e49f67fc6f689dfc6e-2"
Content-Type: application/xml
Content-Length: 364
<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Location>https://kr.object.ncloudstorage.com/example-bucket/multipart-object-123</Location>
  <Bucket>some-bucket</Bucket>
  <Key>multipart-object-123</Key>
  <ETag>"765ba3df36cf24e49f67fc6f689dfc6e-2"</ETag>
</CompleteMultipartUploadResult>