有没有办法通过查询字符串向 s3 对象添加动态标头。类似的东西
_://s3.amazonaws.com/mybucket/myFile.png?headers=MyCustomHeader_Myvalue
解决。
在 s3 获取 Obejct 文档中找到解决方案
使用标头response-content-disposition=attachment;filename='mycustomfilename'
在请求上做诀窍
要为以下一项或多项指定自定义值时,才能在 S3 中执行此操作:
Cache-Control:
Content-Type:
Content-Language:
Content-Disposition:
Content-Encoding:
Expires:
实际上,可以通过添加到已签名查询字符串的信息为每个GET
请求修改这些响应标头。
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html
要添加任何其他内容,需要在浏览器和 S3 之间使用反向代理,因为 S3 不支持动态修改其他响应标头。