Skip to content

takatoh/filestorage-s3

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

Filestorage-S3

A simple file storage for Amazon S3.

Installation

Add this line to your application's Gemfile:

gem 'filestorage-s3'

And then execute:

$ bundle

Or install it yourself as:

$ gem install filestorage-s3

Usage

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

Contributing

  1. Fork it ( https://github.com/takatoh/filestorage-s3/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A simple filestorage for Amazon S3.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages