Problem description
When you access an object in a browser by using a standard Object Storage Service (OSS) domain name, the browser may download the object instead of previewing it.
Cause
For buckets created after 00:00 on October 1, 2017, if you use a standard OSS domain name to access an object whose name ends with .htm or .html or whose ContentType is text/html, OSS adds the following two headers to the response:
x-oss-force-download: true
Content-Disposition: attachment
The Content-Disposition: attachment header causes the browser to download the object instead of previewing it.
Example problem
Assume that a bucket created after 00:00 on October 1, 2017 contains a file named index.html. When you access this object in a browser by using a standard OSS domain name, OSS adds the two preceding headers to the response. The Content-Disposition: attachment header causes the browser to download the object instead of previewing it.
GET /index.html HTTP/1.1HTTP/1.1 200 OK
Content-Disposition: attachment
x-oss-force-download: true
Solution
To prevent OSS from returning headers that force a download, access the object by using a custom domain name. For more information, see Attach a custom domain name.