General procedure for multipart upload

    Multipart upload allows saving objects to Yandex Object Storage in parts. This can be useful when uploading or copying large objects. We recommend that you use multipart upload for objects starting from 100 MB in size.

    To find out the maximum size of an object to upload, see the section Quotas and limits.

    Multipart upload consists of the following steps:

    1. Starting upload. The user sends the start multipart upload request andObject Storage returns the ID to be used for all subsequent upload operations. At this step, user-defined metadata should be passed.

    2. 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 the ETag header in the response. The user should save the numbers and their corresponding ETag headers for all uploaded parts. This is necessary when running the complete upload operation. During the upload, you can get from Object Storage a list of already uploaded object parts.

    3. Completing upload. Upon receipt of the complete upload request Object Storage combines all the uploaded parts into a single object and attaches the metadata that was passed for starting the upload.

    Note

    Until the upload is completed, the object parts are stored separately and occupy some space, therefore they cannot 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 object parts received for the specified upload 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.
    listParts Displays a list of uploaded parts.
    abortUpload Aborts multipart upload.
    completeUpload Completes multipart upload.
    listUploads Returns a list of incomplete uploads.