Help Center> Object Storage Service> FAQs> Buckets and Objects> How Do I Obtain the Access Path to an Object?
Updated on 2024-04-01 GMT+08:00

How Do I Obtain the Access Path to an Object?

Object access paths use the following format: https://{bucket name}.{domain name}/{object name}. The following is an example: https://bucketname.obs.ap-southeast-1.myhuaweicloud.com/objectname.

You can combine a path manually or use the tools in the following table to obtain it.

Table 1 How to obtain an object URL

Tool

Object URL

OBS Console

Click the object and copy the URL for the detailed information of the object.

OBS Browser+

Click the Attribute button of the object and then you can copy the URL displayed in the detailed information about the object.

obsutil

Not supported

SDKs

You can get the URL of an object by calling the getObjectUrl interface.

NOTE:

When uploading an object, you can obtain its URL from the returned value. The URL of an existing object in the bucket cannot be obtained.

APIs

Not supported

If the object access path is user-assembled, you need to escape the object name by referring to the URL encoding rules.

Suppose you have a test bucket in the CN North-Beijing4 region and the bucket stores an object named @@obs.png. When assembling the object access path, you must escape the @@ in the object name based on URL encoding. After the escaping, the actual object access path should be https://test.obs.cn-north-4.myhuaweicloud.com/%40%40obs.png.

Buckets and Objects FAQs

more