Updated on 2022-02-10 GMT+08:00

Before You Start

Due to browser limitations, configure CORS for buckets before calling bucket-related APIs as follows:

  • Set AllowedOrigin to *.
  • Set AllowedMethod to PUT, GET, POST, DELETE, HEAD.
  • Set AllowedHeader to *.
  • Set ExposeHeader to:
    • ETag
    • x-obs-request-id
    • x-obs-id-2
    • x-reserved-indicator
    • x-obs-api
    • x-obs-bucket-location
    • x-obs-version
    • x-obs-storage-class
    • x-default-storage-class

Bucket-related API functions of ObsClient are case insensitive. For example, ObsClient.getBucketLocation and ObsClient.GetBucketLocation indicate the same function.