All Products
Search
Document Center

Object Storage Service:Upload objects by using OSS SDK for Browser.js

Last Updated:Dec 04, 2024

Object Storage Service (OSS) SDK for Browser.js provides a variety of methods to upload objects. You can choose the most suitable method based on your business requirements.

Method

Description

Simple upload

  • You can use simple upload to upload files, Blob data, or OSS buffers to OSS.

  • Suitable for fast uploads of small files.

Append upload

  • You can use append upload to append content to an appendable object.

Multipart upload

  • We recommend that you use multipart upload to upload objects larger than 100 MB and smaller than 48.8 TB.

  • Multipart upload allows you to split a large object into multiple parts to upload. After these parts are uploaded, you can call the CompleteMultipartUpload operation to combine the parts into a complete object.

Resumable upload

  • We recommend that you use resumable upload for the stable upload of large files.

  • Resumable upload records are stored in the checkpoint file. If an object fails to be uploaded due to a network exception or program error, the upload task is resumed from the position recorded in the checkpoint file to upload the remaining data.

Upload callbacks

  • You can configure upload callback parameters to start a callback process for the application server after an object is uploaded.

  • You can perform specific operations after the file is uploaded, such as recording content in logs and subsequent processing tasks.