Multipart upload process
Multipart upload allows you to save objects to Object Storage in parts. This can be useful when uploading or copying large objects. We recommend using a multipart upload for objects that are at least 100 MB.
To find out the maximum size for an object you can upload, see Object Storage quotas and limits.
The multipart upload includes the following steps:
-
Upload initiation.
The user sends a request to initiate a multipart upload (CreateMultipartUpload), and Object Storage returns an ID for all subsequent operations with the upload.
User-defined object metadata should be provided at this step. -
Multipart object upload.
Each part of the object is sent as a separate request (UploadPart) and required to have a sequence number Object Storage will use to assemble the object. If Object Storage receives two parts of the object with the same number, it will save the last one received.
For each uploaded part, Object Storage returns theETagheader in the response. The user should save the numbers and their correspondingETagvalues for all uploaded parts. It is necessary for the upload complete operation.
During the upload, Object Storage can give you a list of already uploaded object parts (ListParts). -
Completing the upload.
Once it gets the complete upload request (CompleteMultipartUpload), Object Storage assembles all the uploaded parts into a single object and attaches to it the metadata provided during the initiation of the upload.Note
Until the upload is complete, the object parts are stored separately and take up space, but you cannot retrieve them from Object Storage. Incomplete uploads are taken into account when calculating the space used.
Other than the complete upload request, the user can also send the abort upload request (AbortMultipartUpload). In this case, Object Storage deletes all the parts of the object it received and the upload itself.
After completing or aborting an upload, the user will not be able to use the ID of that upload in requests.
You can run several multipart uploads simultaneously.
You can get a list of incomplete uploads (ListMultipartUploads).
Multipart upload methods:
| Method | Description |
|---|---|
| CreateMultipartUpload | Starts a multipart upload. |
| UploadPart | Uploads a part of an object. |
| UploadPartCopy | Copies part of an object. |
| ListParts | Returns a list of uploaded parts. |
| AbortMultipartUpload | Aborts a multipart upload. |
| CompleteMultipartUpload | Completes a multipart upload. |
| ListMultipartUploads | Returns a list of incomplete uploads. |