With CDN Acceleration Enabled, Why Are the Objects in My OBS Bucket Directly Downloaded When I Access Them?
Symptoms
After CDN acceleration is enabled for a user-defined domain name on OBS Console or the origin server address for an acceleration domain name added through the CDN console is set to an OBS bucket domain name, the objects stored in OBS cannot be previewed, but are directly downloaded when they are accessed.
Solutions
You can use the following two methods to fix this issue:
Method 1
Log in to the CDN console and go to the Domains page. On the Domains page, click the target domain name and then the Advanced Settings tab. Add the Content-Disposition response header and set its value to inline.
If the issue persists after the preceding configuration is complete, refresh the cache on the CDN console. For details, see Cache Refreshing.
Method 2
Log in to the CDN console and go to the Domains page. On the Domains page, click the target domain name, then the Basic Settings tab, and click Edit next to Origin Server Settings. In the displayed dialog box, change the value of Type from OBS bucket to Domain name, configure Origin to the OBS bucket domain name, and set HTTP port and HTTPS port to 80 and 443 respectively.
In this method, the origin server's domain name is used to access CDN. Generated retrieval traffic will be billed as the outbound Internet traffic and cannot be covered by pull traffic packages offered by OBS.
If the issue persists after the preceding configuration is complete, refresh the cache on the CDN console. For details, see Cache Refreshing.
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