In short
In short I want to know if I can send additional headers through a carrierwave and fog connection to Amazon s3?
In depth
I recently found that amazon supports Client and Server side encryption of files. more info » http://docs.amazonwebservices.com/AmazonS3/latest/dev/SSEUsingRESTAPI.html
I'm currently using carrierwave in a rails app to upload files to amazon s3.
For server side encryption amazon asks for a header of x-amz-server-side-encryption=AES256 added to the request.
So I'm looking to figure out how to send additional headers through with my carrierwave and fog.
My thought was that maybe I could use the fog_attribute config line something like the following and maybe that might work but I'm not sure the fog_attribute is for partiular attribute or just a blanket header section.
config.fog_attributes = {'x-amz-server-side-encryption' => 'AES256','Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
So I finally got my app in shape to test this but unfortunately it didn't work.
I also found this: https://github.com/geemus/fog/commit/070e2565d3eb08d0daaa258ad340b6254a9c6ef2 commit in the fog repository that make me feel the fog_attributes method is for a defined list of attributes.
There has got to be a way to make this work. Anyone?