All Products
Search
Document Center

Object Storage Service:0048-00000108

Last Updated:Jul 21, 2023

Problem description

When an acceleration endpoint of Object Storage Service (OSS) is used to access an object from a browser, the browser downloads the object instead of providing a preview of the object.

Causes

If you use an acceleration endpoint to access an object in a bucket for which transfer acceleration was enabled after 18:00:00 on January 7, 2021, the response returned by OSS includes the x-oss-force-download and Content-Disposition headers.

x-oss-force-download: true
Content-Disposition: attachment

Content-Disposition: attachment triggers a download operation instead of a preview in a standard browser.

Examples

For example, if you use the acceleration endpoint in a browser to access an object named test in a bucket for which transfer acceleration was enabled after 18:00:00 on January 7, 2021, the preceding two headers are included in the response. Content-Disposition: attachment triggers a standard browser to download the object instead of providing a preview.

GET /test HTTP/1.1

HTTP/1.1 200 OK
Content-Disposition: attachment
x-oss-force-download: true

Solutions

If you do not want OSS to return a header that triggers the download operation, use a custom domain name to access the object. For more information, see Map custom domain names.

References