Since there are new regions of Amazon S3 services that accepts only Signature v4 (e.g. frankfurt) you cannot use aws-sdk-v1
gem's #presigned_url functionality. And newer aws-sdk
gem (beeing stil in preview for 2.x) doesn't have a functionality to do direct uploading either. Here's my inplementation of that functionality, build on top of aws-sdk v2.0.16.pre
and jquery (it's using some javascript stuff that older browsers won't support though).
For some basic information see this Heroku's Direct to S3 Image Uploads in Rails article https://devcenter.heroku.com/articles/direct-to-s3-image-uploads-in-rails . A "how to" by Amazaon itself in Authenticating Requests in Browser-Based Uploads Using POST (AWS Signature Version 4) http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-UsingHTTPPOST.html (notice beelow are subsections of details, like how to create signing policy).
So, I build it the way,