0

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
doron aviguy
  • 2,554
  • 2
  • 22
  • 18

1 Answers1

0

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.

Michael - sqlbot
  • 169,571
  • 25
  • 353
  • 427