CompleteMultipartUpload

Completes a multipart upload by assembling previously uploaded parts.

Initiate the multipart upload, then upload all parts using the UploadPart <UploadPart> operation.

After successfully uploading all relevant parts of an upload, call this action to complete the upload. Upon receiving this request, Tebi concatenates all parts in ascending order by part number to create a new object.

In the Complete Multipart Upload request, you must provide the parts list and make sure it is complete. This action concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the ETag value, which is returned after the part is uploaded.

Processing a Complete Multipart Upload request takes very little time. All processing and replication is done asynchronously.

You must have Upload ACL to be able to call this action.

The following operations are related to CompleteMultipartUpload:

Request Syntax

 1POST /<KEY>?uploadId=<UPLOAD_ID> HTTP/1.1
 2Host: <BUCKET>.s3.tebi.io
 3
 4<?xml version="1.0" encoding="UTF-8"?>
 5<CompleteMultipartUpload xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 6<Part>
 7    <ETag>string</ETag>
 8    <PartNumber>integer</PartNumber>
 9</Part>
10...
11</CompleteMultipartUpload>
  • <BUCKET>: Bucket name to which the upload was taking place. Required.

  • <KEY>: Key of the object for which the multipart upload was initiated. Required.

  • <UPLOAD_ID>: Upload ID that identifies the multipart upload. Required.

The request accepts the following data in XML format:

  • CompleteMultipartUpload: Root level tag for the CompleteMultipartUpload parameters. Required.

  • Part: Array of CompletedPart data types. Required.

Response Syntax

 1HTTP/1.1 200
 2Content-Type: application/xml
 3Content-Length: ...
 4x-amz-expiration: Expiration
 5x-amz-server-side-encryption: ServerSideEncryption
 6
 7<?xml version="1.0" encoding="UTF-8"?>
 8<CompleteMultipartUploadResult>
 9    <Location>string</Location>
10    <Bucket>string</Bucket>
11    <Key>string</Key>
12    <ETag>string</ETag>
13</CompleteMultipartUploadResult>

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers:

  • x-amz-expiration: If the object expiration is configured, this will contain the expiration date and rule ID.

  • x-amz-server-side-encryption: If you specified server-side encryption either with a bucket setting or x-amz-server-side-encryption header during the CreateMultipartUpload request, this confirms the encryption algorithm that Tebi used to encrypt the object.

  • CompleteMultipartUploadResult: Root level tag for the CompleteMultipartUploadResult parameters.

  • Location: URI that identifies the newly created object.

  • Bucket: Name of the bucket that contains the newly created object.

  • Key: Object key of the newly created object.

  • ETag: Entity tag that identifies the newly created object’s data.

See Also

Refer here for more information.