0048-00000113
Description
When you use a browser and an Object Storage Service (OSS) acceleration endpoint to access an object, the browser downloads the object instead of displaying it.
Cause
If you activated OSS after 00:00 on October 9, 2022, and use an OSS domain name to access any object, OSS adds two headers to the response:
x-oss-force-download: true
Content-Disposition: attachmentA standard browser downloads the object instead of previewing it when it receives the Content-Disposition: attachment header.
Example
For example, you activate OSS after 00:00 on October 9, 2022, and create a bucket that contains an object named test.jpg. When you use a browser and an OSS domain name to access test.jpg:
GET /test.jpg HTTP/1.1OSS adds the Content-Disposition and x-oss-force-download headers to the response.
HTTP/1.1 200 OK
Content-Disposition: attachment
x-oss-force-download: trueWhen a standard browser detects Content-Disposition: attachment, it downloads the object instead of previewing it.
Solution
If you do not want OSS to return a header that triggers a download, use a custom domain name to access the object. For more information, see Attach a custom domain name.