亚马逊s3,通过查询字符串向对象GET添加动态标头 [英] amazon s3, adding dynamic headers to object GET by query string
问题描述
是否有一种通过查询字符串将动态标头添加到s3对象的方法.
_://s3.amazonaws.com/mybucket/myFile.png?headers = MyCustomHeader_Myvalue
已解决.
在 s3获取对象文档
使用标题 response-content-disposition =附件; 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不支持动态修改其他响应标头.
Is there a way to add dynamic headers to an s3 Object by query string. Something like
_://s3.amazonaws.com/mybucket/myFile.png?headers=MyCustomHeader_Myvalue
Solved.
Found the Solution in the s3 Get Obejct docs
Using the header response-content-disposition=attachment; filename='mycustomFileName'
On the Request does the trick
This is only possible in S3 if you want to specify a custom value for one or more of the following:
Cache-Control:
Content-Type:
Content-Language:
Content-Disposition:
Content-Encoding:
Expires:
These response headers can actually be modified for each GET
request by information you add to a signed query string.
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html
To add anything else would require a reverse proxy between the browser and S3, since S3 doesn't support dynamic modification of other response headers.
这篇关于亚马逊s3,通过查询字符串向对象GET添加动态标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!