On this page

Show all

Help Center/ Object Storage Service/ SDK Reference/ BrowserJS/ Initialization/ Configuring an Instance of ObsClient

Configuring an Instance of ObsClient

Updated on 2024-04-26 GMT+08:00
NOTICE:

If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference.

You can set the following initialization parameters to configure an instance of ObsClient:

Parameter

Description

Recommended Value

access_key_id

AK

N/A

secret_access_key

SK

N/A

server

Endpoint for accessing OBS, which contains the protocol type, domain name (or IP address), and port number. For example, https://your-endpoint:443. For security purposes, you are advised to use HTTPS.

N/A

timeout

The total timeout period (in seconds) of an HTTP/HTTPS request. The default value is 300.

[10,300]

is_cname

Whether to use self-defined domain name to access OBS. The default value is false.

N/A

useRawXhr

Whether to use the native XHR to send Ajax requests. The default value is false.

N/A

NOTE:
  • Parameters whose recommended value is N/A need to be set according to the actual conditions.
  • If the network is unstable or the size of the file to be uploaded is large, you are advised to set a larger value for timeout.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback