General procedure for a multipart upload
Multipart upload lets you save objects to Object Storage in parts. This can be useful when uploading or copying large objects. We recommend using multipart upload for objects that are at least 100 MB.
To find out the maximum size for a object you can upload, see Quotas and limits in Object Storage.
Multipart upload consists of the following steps:
-
Starting the upload.
The user sends the start multipart upload request and Object Storage returns the ID to be used for all subsequent upload operations.
At this step, user-defined metadata should be passed. -
Uploading an object in parts.
Each part of the object is sent in a separate request and must have a sequence number that is used to build the object on the Object Storage side. 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 theETag
header in the response. The user should save the numbers and their correspondingETag
headers for all uploaded parts. It is necessary for the upload complete operation.
During the upload, you can get a list of already uploaded object parts from Object Storage. -
Completing the upload.
After receiving the complete upload request, Object Storage combines all the uploaded parts into a single object and attaches the metadata that was passed when the upload started.Note
Until the upload is complete, the object parts are stored separately and take up space, therefore they can't be retrieved from Object Storage. Incomplete uploads are taken into account when calculating the space used.
In addition to the complete upload request, the user can send the abort upload request. In this case, Object Storage deletes all the parts of the object that 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 also get a list of incomplete uploads.
Multipart upload methods:
Method | Description |
---|---|
startUpload | Starts multipart upload. |
uploadPart | Uploads a part of an object. |
copyPart | Copies part of an object. |
listParts | Displays a list of uploaded parts. |
abortUpload | Aborts multipart upload. |
completeUpload | Completes multipart upload. |
listUploads | Returns a list of incomplete uploads. |