Last updated: 2019-11-13 15:16:31PDF
Multipart upload is well suited for uploading large objects in weak network or high-bandwidth environments. The COS Console and SDKs can break a single object into multiple parts and then upload them. You can also do so by yourself and upload each part through API calls. Multipart upload has the following benefits:
- In a weak network, smaller part size minimizes the impact of restarting a failed upload due to network errors.
- In a high-bandwidth environment, multipart upload can maximize the use of your available bandwidth by uploading object parts in parallel. Uploading parts out of order does not affect the final merged object.
- With multipart upload, you can pause and resume the upload of a single large object at any time. All incomplete multipart uploads can be resumed unless aborted.
- Multipart upload can also be used to begin an upload before you know the final object size. You can initiate an upload and then merge the parts to get the full object size.
When uploaded, the parts are numbered consecutively. You can upload each part separately or upload them in any order. COS will merge the parts into an object based on their numbers. If the upload of any part fails, the failed part can be uploaded again without affecting other parts and the content as a whole. In a weak network environment, multipart upload is recommended for objects larger than 20 MB. In a high-bandwidth environment, multipart upload is recommended for objects larger than 100 MB.
Via REST API
You can use the REST API directly to initiate a multipart upload request. For more information, see the following API documents:
Via the SDK
You can directly call the multipart upload method in the SDK. For more information, see the SDK documentation for the corresponding programming language below: