I’m using this code to create an authenticated Amazon Url
http://developer.longtailvideo.com/trac/browser/testing/files/s3-generator.php
Is it possible to somehow let Amazon know that the file needs to be force-downloaded by adding a Content-Disposition header?
After gathering the individual pieces of this puzzle, I was able to create this Ruby method that properly signs a query string url using the aws secret key.
My resources for this:
Also, the response back from S3 was helpful, because when I created a url with a bad signature, the response showed the string_to_sign that AWS S3 generated from deciphering the URL I generated. After a few iterations I was able to converge on the correct formatting of the string_to_sign and after that it was pretty standard stuff.
Here is the Ruby method:
And you call the method like this: