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

Before You Start

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

  • Set AllowedOrigin to *.
  • Set AllowedMethod to PUT, GET, POST, DELETE, HEAD.
  • Set AllowedHeader to *.
  • Set ExposeHeader to:
    • ETag
    • Content-Type
    • Content-Length
    • Cache-Control
    • Content-Disposition
    • Content-Encoding
    • Content-Language
    • Expires
    • x-obs-request-id
    • x-obs-id-2
    • x-reserved-indicator
    • x-obs-api
    • x-obs-version-id
    • x-obs-copy-source-version-id
    • x-obs-storage-class
    • x-obs-delete-marker
    • x-obs-expiration
    • x-obs-website-redirect-location
    • x-obs-restore
    • x-obs-version
    • x-obs-object-type
    • x-obs-next-append-position

Object-Related API functions of ObsClient are case insensitive. For example, ObsClient.putObject and ObsClient.PutObject indicate the same function.