当前位置: 动力学知识库 > 问答 > 编程问答 >

amazon s3 , adding dynamic headers to object GET by query string SOLVED

问题描述:

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

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: