Why Can't I Access an Object Through Its URL?
This case describes the scenario where an object cannot be accessed using its URL. If you can use a URL to download an object, but cannot use the URL to preview the object, resolve the issue by referring to How Do I Preview Objects in OBS in a Browser Online?
If you are the owner of the object and cannot access the object using its URL, check the following items:
- If your object URL is customized, check whether it contains forbidden characters. For details, see Guidelines on Naming Object Keys in the User Guide.
- If you are using a user-defined domain name, check whether your domain name has been mapped to the OBS bucket's domain name. For details, see the part for configuring a CNAME record on the DNS in Binding a User-Defined Domain Name.
If the object URL is provided by others, contact the object owner for the following items:
- Check whether the object is encrypted. If it is, that is normal. An encrypted object cannot be shared. If the object owner wants to share that encrypted object, the object should be deleted and then uploaded again without the encryption settings.
- If the object URL is generated by sharing, check whether the sharing has expired. If it does, share the object and set the validity period again. This can be performed by the object owner on OBS Console or OBS Browser+. You can determine whether an object URL is generated by sharing based on its format. For details, see Sharing a File.
Tool
Configuration
OBS Console
OBS Browser+
- If the object URL is in the format of BucketName.Endpoint/ObjectName, for example, bucketname.obs.ap-southeast-1.myhuaweicloud.com/object.txt, the object URL is not generated by sharing. In this case, check whether the user has been granted object access permissions. Check the bucket policy, bucket ACL, object policy, and object ACL. If the user does not have required permissions, grant them to the user.
You can use the following tools to grant permissions:
Tool
Configuration
OBS Console
Configuring a Bucket ACL, Configuring a Bucket Policy, Configuring an Object ACL, and Configuring an Object Policy
OBS Browser+
-
obsutil
SDKs
Section about using URL to authorize access permissions in the SDK Reference
API
Configuring a Bucket ACL, Configuring a Bucket Policy, and Configuring an Object ACL
- Check whether a URL validation whitelist or blacklist has been configured for the bucket storing the object.
Buckets and Objects FAQs
- Why Am I Unable to Create a Bucket?
- Why Am I Unable to Upload an Object?
- Why Am I Unable to Download an Object?
- Why Can't I Delete a Bucket?
- Why Can't I Delete an Object?
- Why Can't I Access an Object Through Its URL?
- What Is the Relationship Between Bucket Storage Classes and Object Storage Classes?
- Can I Rename an Object?
- Can I Modify the Region of a Bucket?
- Can I Copy a File Between Buckets?
- Can I Move a File Between Buckets?
- Can I Edit Objects in OBS Online?
- How Do I Obtain the Access Path to an Object?
- Why Can't I Search for Certain Objects in My Bucket?
- How Do I Preview Objects in OBS in a Browser Online?
- What Should I Do If an Error Message Is Displayed When I Use Internet Explorer to Access an Object URL That Contains Chinese Characters?
- With CDN Acceleration Enabled, Why Are the Objects in My OBS Bucket Directly Downloaded When I Access Them?
- Why Is an Error Reported Even If CORS Has Been Configured?
- How Do I Query the Size of a Folder in a Bucket?
- How Do I Batch Delete a Large Number of Objects from a Bucket or Empty a Bucket?
- How Do I Change the Enterprise Project Where My Bucket Belongs?
- How Do I Upload Objects Larger Than 5 GB?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore