Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Object Storage
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Buckets
      • Creating a bucket
      • Deleting a bucket
      • Limiting the maximum size of a bucket
      • Allowing public access to a bucket
      • Bucket encryption
      • Managing object lifecycles
      • Managing CORS configurations
      • Editing a bucket ACL
      • Logging actions with the bucket
    • Objects
      • Uploading an object
      • Getting information about an object
      • Downloading an object
      • Getting a public link to an object
      • Deleting an object
      • Deleting a partially uploaded object
      • Editing an object ACL
    • Static website hosting
      • Hosting setup
      • Support for your own domain
      • Support for multiple domain names
      • Configuring HTTPS
  • Concepts
    • Overview
    • Bucket
    • Objects
    • Bucket versioning
    • Object lifecycles
    • CORS
    • Static website hosting
    • Pre-signed URLs
    • Multipart upload
    • Access control lists (ACLs)
    • Bucket Policy
    • Upload file via HTML form
    • Storage class
    • Logging actions with a bucket
    • Backups
    • TLS protocol
    • Quotas and limits
  • Tools
    • All tools
    • Console clients
      • AWS CLI
      • S3cmd
    • File browsers
      • CyberDuck
      • WinSCP
    • SDK
      • AWS SDK for Java
      • Python SDK (boto)
    • FUSE
      • s3fs
      • goofys
  • Amazon S3-compatible HTTP API
    • How to use the API
    • Signing requests
    • API reference
      • All services and methods
      • Bucket
        • All methods
        • create
        • getBucketEncryption
        • getMeta
        • listObjects
        • listBuckets
        • deleteBucket
        • deleteBucketEncryption
        • putBucketEncryption
        • putBucketVersioning
        • getBucketVersioning
        • putBucketLogging
        • getBucketLogging
        • listObjectVersions
      • Object
        • All methods
        • upload
        • get
        • copy
        • getObjectMeta
        • delete
        • deleteMultipleObjects
        • options
      • Multipart upload
        • General multipart upload procedure
        • startUpload
        • uploadPart
        • copyPart
        • listParts
        • abortUpload
        • completeUpload
        • listUploads
      • Static Website Hosting
        • All methods
        • upload
        • get
        • delete
        • Static website response codes
      • CORS
        • All methods
        • XML structure of CORS configuration
        • upload
        • get
        • delete
      • Lifecycles
        • All methods
        • XML structure of lifecycle configuration
        • upload
        • get
        • delete
      • ACL
        • All methods
        • XML structure of ACL configuration
        • objectGetAcl
        • objectPutAcl
        • bucketGetAcl
        • bucketPutAcl
      • Bucket Policy
        • All methods
        • GetBucketPolicy
        • PutBucketPolicy
        • DeleteBucketPolicy
        • Data schema
        • Actions
        • Conditions
      • Common request headers
      • Common response headers
      • Responses
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
  • Questions and answers
  1. Amazon S3-compatible HTTP API
  2. API reference
  3. Multipart upload
  4. completeUpload

completeUpload method

  • Request
    • Path parameters
    • Query parameters
    • Headers
    • Data schema
  • Response
    • Headers
    • Response codes
    • Data schema

The request completes multipart upload.

When receiving the request, Object Storage:

  • Combines the parts obtained during the upload in the order of their numbering to form a target object.
  • Deletes the upload ID, which means that any subsequent requests with that ID will return the NoSuchUpload error.

When completing the upload, the client must provide the list of the parts it sent. Each part's description must contain the ETag which the client receives in response to each uploaded part. See uploadPart method.

The operation may take several minutes, depending on the object size and the number of parts.

If the request failed, the client app must be ready to repeat the request.

Request

POST /{bucket}/{key}?uploadId=UploadId HTTP/1.1

Path parameters

Parameter Description
bucket Bucket name.
key Object key.

Query parameters

Parameter Description
uploadId ID of the multipart upload returned by Object Storage at the start.

Headers

Use the necessary common request headers in requests.

Data schema

The list of parts of a multipart upload is passed as an XML file in the following format:

<CompleteMultipartUpload>
  <Part>
    <PartNumber>PartNumber</PartNumber>
    <ETag>ETag</ETag>
  </Part>
  ...
</CompleteMultipartUpload>
Tag Description
CompleteMultipartUpload Data in the request.

Path: /CompleteMultipartUpload.
Part Data about the object's uploaded part.

Path: /CompleteMultipartUpload/Part.
PartNumber Part number.

A unique identifier that determines the part's position among the other parts in the upload.

Path: /CompleteMultipartUpload/Part/PartNumber.
ETag ID that the client received from Object Storage in response to the upload of a part.

Path: /CompleteMultipartUpload/Part/ETag.

Response

Headers

Responses can only contain common response headers.

Response codes

For a list of possible responses, see Responses.

Additionally, Object Storage may return errors described in the table below.

Error Description HTTP code
NoSuchUpload The specified upload doesn't exist. The specified upload ID might be incorrect or the upload was completed or deleted. 404 Not Found
InvalidPart Some of the specified parts not found.

Possible causes:
- The parts have not been uploaded.
- The passed ETag does not match the saved one.
400 Bad Request
InvalidPartOrder The list of parts was not in ascending order.

The list must be sorted by part number in ascending order.
400 Bad Request

A successful response contains additional data in XML format with the schema described below.

Data schema

<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Location>http://Example-Bucket.storage.yandexcloud.net/Example-Object</Location>
  <Bucket>Example-Bucket</Bucket>
  <Key>Example-Object</Key>
  <ETag>"3858f62230ac3c915f300c664312c11f-9"</ETag>
</CompleteMultipartUploadResult>
Tag Description
CompleteMultipartUploadResult Response data.

Path: /CompleteMultipartUploadResult.
Location URI of the object created as a result of uploading.

Path: /CompleteMultipartUploadResult/Location.
Bucket Name of the bucket where the object is located.

Path: /CompleteMultipartUploadResult/Bucket.
Key Key of the created object.

Path: /CompleteMultipartUploadResult/Key.
ETag Hash value of the object.

ETag may or may not be an MD5 hash.

Path: /CompleteMultipartUploadResult/ETag.
In this article:
  • Request
  • Path parameters
  • Query parameters
  • Headers
  • Data schema
  • Response
  • Headers
  • Response codes
  • Data schema
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC