If an object cannot be previewed but is downloaded when you use a browser to access the object, you can refer to this topic to check your Object Storage Service (OSS), Alibaba Cloud CDN (CDN), and browser settings to troubleshoot the issue.
Item | Cause | Solution |
OSS | You used the default domain name or an acceleration endpoint to access the object. To ensure data transmission security, when you use the default domain name or an acceleration endpoint of OSS to access an object of a specific type in a bucket that is created at a specific point in time (for example, the Content-Type header of the object is text/html or image/jpeg), OSS forcibly adds the following headers to the response: | Use a custom domain name to access the object. Before you use a custom domain name, you must map the domain name to the bucket. For more information, see Map custom domain names. |
The | Modify the Content-Type header based on the object type. For more information, see How do I configure the Content-Type header? | |
The | Set the Content-Disposition header to | |
CDN | Resources cached on points of presence (POPs) are not refreshed. | Refresh resources cached on POPs. For more information, see Refresh and prefetch resources. |
Browser | The file format is not supported for preview by your browser. For example, your browser may not support preview of XLS, DOC, PPT, or PDF files. | Install a plug-in for your browser to provide preview support for the preceding formats. |
Appendix: x-oss-ec rules triggered for forcible download
The following table describes the x-oss-ec rules that are triggered for forcible download when you use the default domain name or an acceleration endpoint of OSS to access different types of objects.
Default OSS domain name
Effective at | Applicable scope | Content-Type | x-oss-ec |
At or after 00:00 on October 01, 2017 | Created buckets | text/html | |
At or after 17:00:00 on September 23, 2019 |
| ||
At or after 11:00:00 on September 24, 2019 | |||
At or after 17:00:00 on September 24, 2019 | |||
At or after 17:00:00 on September 29, 2019 | |||
At or after 18:00:00 on September 29, 2019 | |||
At or after 15:00:00 on September 30, 2019 | |||
At or after 00:00:00 on October 09, 2022 | Users who have activated OSS |
Acceleration endpoints
Effective at | Applicable scope | Content-Type | x-oss-ec |
At or after 00:00:00 on December 31, 2020 | Buckets that are located in the China (Hong Kong) region and regions outside China and for which transfer acceleration is enabled | text/html | |
At or after 11:07:00 on November 17, 2020 | |||
At or after 12:00:00 on January 07, 2021 | |||
At or after 18:00:00 on January 07, 2021 | |||
At or after 18:00:00 on January 8, 2021 | |||
At or after 12:00:00 on January 14, 2021 | |||
At or after 00:00:00 on January 16, 2021 | |||
At or after 00:00:00 on February 01, 2023 |