A simple file storage for Amazon S3.
Add this line to your application's Gemfile:
gem 'filestorage-s3'
And then execute:
$ bundle
Or install it yourself as:
$ gem install filestorage-s3
Create a instance.
require 'filestorage-s3'
bucket = Filesotrage::AmazonS3.new(bucketname, access_key_id, secret_access_key)
Store a file to path.
bucket.store("foo/bar/baz.txt", file)
And get the file. `get' method returns instance of AWS::S3::S3Object class.
obj = bucket.get("foo/bar/baz.txt")
content = obj.read
- Fork it ( https://github.com/takatoh/filestorage-s3/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request