0.0
No commit activity in last 3 years
No release in over 3 years
Gem generates a signature and policy from AWS Secret key.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 10.0
~> 3.0
 Project Readme

S3::Authorize

Build Status

S3 accepts uploads via specially-crafted and pre-authorized HTML POST Form (http://aws.amazon.com/articles/1434/). This gem will help you create two values: Signature and Policy.

You guys can use this gem when working with upload file by AngularJS - (https://github.com/danialfarid/ng-file-upload#s3) or Cordova File Transfer plugin (https://github.com/apache/cordova-plugin-file-transfer) or any front-end stack.

Installation

Add this line to your application's Gemfile:

gem 's3-authorize'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install s3-authorize

Usage

require 's3/authorize'

s3_authorize = S3::Authorize.new(bucket: 'example', acl: 'public-read', 'secret_key': '356789032')

s3_policy = s3_authorize.policy # eyJleHBpcmF0aW9uIjoiMjAxNi0wNC0yNlQxOTozNjowNFoiLCJjb25 ....

s3-signature = s3_authorize.signature(s3_policy) # VR9hEPY0zvMHOt ....

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vinhnglx/s3-authorize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.