When I use an OSS endpoint to access a web file through the Internet, the Content-Disposition: 'attachment=filename;' is automatically added to the Response Header, and the web file is downloaded as an attachment. All I want to do is display my objects on public read without binding a domain. just like aws's S3
Steps taken:
- Create oss bucket set Basic Setting -> ACL = Public Read
- Set Static Pages -> Default Homepage = index.html
- Set Static Pages -> Default 404 Page = error.html
- Upload index.html & error.html into the bucket
- Access the bucket via https://bucket-name.oss-region.aliyuncs.com/ will download the index.html page instead of displaying the content.
- Access the non-existing page will show the error.html
Please bind a domain name to the bucket. Otherwise, it wouldn't show in HTML form.
How to bind? Refer to this https://www.alibabacloud.com/help/en/object-storage-service/latest/tutorial-use-a-custom-domain-name-to-configure-static-website-hosting#section-v8z-78y-mzy