Help Center/ Object Storage Service/ FAQs/ Buckets and Objects/ Why Can't I Access an Object Through Its URL?
Updated on 2024-10-15 GMT+08:00

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 OBS Objects in My Web Browser?

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.
  • 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 an Object.

    Tool

    Configuration

    OBS Console

    Sharing an Object

    OBS Browser+

    Sharing a File

  • 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:
  • Check whether a URL validation whitelist or blacklist has been configured for the bucket storing the object.