0048-00000108

Updated at:

Problem description

When you use an Object Storage Service (OSS) acceleration endpoint to access an object from a browser, the browser downloads the object instead of displaying it.

Cause

If you use an OSS acceleration endpoint to access an object in a bucket with transfer acceleration enabled after 18:00 on January 7, 2021, OSS adds the following two headers to the response:

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

The Content-Disposition: attachment header prompts standard browsers to download the object instead of displaying it.

Example problem

For example, transfer acceleration is enabled for your bucket after 18:00 on January 7, 2021. The bucket contains an object named test. If you use a browser to access this object using the OSS acceleration endpoint, OSS adds the preceding two headers to the response. The Content-Disposition: attachment header then prompts the browser to download the object instead of displaying it.

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

Solution

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