Updated on 2023-04-26 GMT+08:00

Uploading a File

This section describes how to upload local files to OBS over the Internet. These files can be texts, images, videos, or any other type of files.

Limitations and Constraints

OBS Console has restrictions on the size and number of files uploaded.

  • In regions where batch upload is supported, a maximum of 100 files can be uploaded at a time, with a maximum total size of 5 GB.
  • In regions where batch upload is not supported, only one file can be uploaded at a time, with a maximum size of 50 MB.

Therefore, for a single file to be uploaded, its maximum size can be 5 GB in a batch upload or 50 MB in a single upload.

To upload a file larger than 5 GB, but no larger than 48.8 TB, you can use OBS Browser+ or obsutil, or the multipart upload of OBS SDKs or APIs.

OBS Browser+ allows you to upload a maximum of 500 files at a time. There is no limit on the number of files you can upload using obsutil at a time.

If you have more data to upload, refer to Migrating Local Data to OBS.

Batch upload is available only when both of the following conditions are met:

  1. The bucket is in any of the following regions:
  2. The bucket version is 3.0. To view the bucket version, see Viewing Basic Information of a Bucket.

If versioning is disabled for your bucket and you upload a new file with the same name as the one you previously uploaded to your bucket, the new file automatically overwrites the previous file and does not retain its ACL information. If you upload a new folder using the same name that was used with a previous folder in the bucket, the two folders will be merged, and files in the new folder will overwrite namesake files in the previous folder.

After versioning is enabled for your bucket, if the new file you upload has the same name as the one you previously uploaded to the bucket, a new file version will be added in the bucket. For details, see Versioning.


  • At least one bucket has been created.
  • If you want to classify files, you can create folders and upload files to different folders. For details about how to create a folder, see Creating a Folder


  1. In the navigation pane of OBS Console, choose Object Storage.
  2. In the bucket list, click the bucket name you want. The Objects page is displayed.
  3. Go to the folder to which objects are uploaded. Click Upload Object. The Upload Object dialog box is displayed.

    The following uses the batch upload as an example. For regions that support only single upload, perform operations as prompted.

    If the files that you want to upload to OBS are stored in Microsoft OneDrive, it is recommended that the names of these files contain a maximum of 32 characters to ensure compatibility.

    Figure 1 Uploading objects

  4. Select a storage class. If you do not specify a storage class, the object you upload inherits the default storage class of the bucket.

    An object can have a different storage class from its bucket. You can specify a storage class for an object when uploading it, or you can change the object storage class after the object is uploaded.

  5. Add a file or folder to be uploaded by dragging it to the Upload Object area.

    You can also click add file in the Upload Object area to select files.

  6. Server-Side Encryption: Choose Disable or SSE-KMS. For details, see Uploading a File in Server-Side Encryption Mode.

    When server-side encryption is enabled for a bucket, you can select Inherit from bucket when uploading an object, for the object to inherit the encryption settings from the bucket.

  7. (Optional) To configure metadata or WORM retention policies, click Next: (Optional) Configure Advanced Settings.

    WORM retention policies can be configured in the advanced settings only when WORM is enabled for the bucket.

    Configuring metadata: Add metadata ContentDisposition, ContentLanguage, WebsiteRedirectLocation, ContentEncoding, or ContentType as needed. For more information, see OBS Object Metadata. Metadata is a set of name-value pairs. The metadata value cannot be left blank. You can add two or more metadata entries by clicking Add.

    Configuring WORM retention: Choose Inherit from bucket, or choose Configure and then specify a retention period, to automatically protect new objects uploaded to the bucket from being deleted.

    Figure 2 Configuring metadata or WORM retention

  8. Click Upload.

Related Operations

When uploading an object, you can specify a storage class for it. After the object is uploaded, you can also change its storage class. The procedure is as follows:

  1. In the navigation pane of OBS Console, choose Object Storage.
  2. In the bucket list, click the bucket name you want. The Objects page is displayed.
  3. Select the target object and choose More > Change Storage Class on the right.

    You can also select multiple files at a time and choose More > Change Storage Class above the object list, to change the storage class of objects in a batch.

    Storage classes of the Archive objects cannot be changed if they are not restored.

  4. Select the desired storage class and click OK.
  • Objects can be changed from Standard to the Infrequent Access or Archive storage class, or from Infrequent Access to the Standard or Archive storage class. Archive objects must be restored before they can be changed to the Standard or Infrequent Access storage class. Changing from Infrequent Access or Archive to other storage classes incurs restore fees. Select an appropriate change option based on your actual needs.
  • When the storage class is changed to Archive, the object restore status changes to Unrestored.
  • You can also configure a lifecycle rule to change the storage class of an object. For details, see Configuring a Lifecycle Rule.

Follow-up Procedure

You can click More > Copy Path on the right of an object to copy its path.

You can share the path with other users. Then they open the bucket where the object is stored and enter the path in the search box to find the object.