Help Center> Object Storage Service> FAQs> Buckets and Objects> With CDN Acceleration Enabled, Why Are the Objects in My OBS Bucket Directly Downloaded When I Access Them?
Updated on 2022-07-07 GMT+08:00

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

more