Why Can't I Access an Object Through Its URL?
If you are the owner of the object and cannot access the object using the URL, check the following items:
- Check whether the ContentType of the object metadata is correct. For details about the values of ContentType, see Object Metadata Overview. If the ContentType value does not fall into the correct value range, correct it. You can change the ContentType in the object metadata on OBS Console, or by using an API or SDK.
Table 1 Modifying object metadata Tool
Reference
OBS Console
API
SDK
Section about setting object attributes in the SDK Reference
- If you are using a user-defined URL, check whether the object URL contains forbidden characters. For details, see the description of forbidden URL characters in the developer guide.
If you are the object owner and have shared the URL with other users but they cannot access the object, check the following items:
- Check whether the object is encrypted. If it is encrypted, the URL of the object cannot be shared. If you want to share this encrypted object, delete it and upload it again, and make sure it is not encrypted during upload.
- Check whether sharing is enabled for the object. If sharing has been enabled, check if the period of time configured for sharing has expired. If it has expired, you can reset it. You can configure the following items on OBS Console and OBS Browser+:
Tool
Configuration
OBS Console
Browser+
- If the object was not shared through sharing, check whether the object access permission was granted to the user. Check the bucket policy, bucket ACL, object policy, and object ACL. If the user does not have the permission to access the object, grant permission 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 Object ACL, Configuring an Object Policy
OBS Browser+
-
obsutil
SDK
Section about using URL to authorize access permission in the SDK Reference
API
Configuring a Bucket ACL, Configuring a Bucket Policy, Configuring Object ACL
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.