Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/english/s3

Super simple library for uploading to, and deleting from, S3.
https://github.com/english/s3

Last synced: 5 days ago
JSON representation

Super simple library for uploading to, and deleting from, S3.

Awesome Lists containing this project

README

        

# S3

Super simple library for uploading to, and deleting from, S3.

## Installation

Add this line to your application's Gemfile:

gem 's3', github: 'jamienglish/s3'

And then execute:

$ bundle

## Usage

```ruby
require "s3"

S3.configure do |config|
config.access_key_id = ENV["AWS_ACCESS_KEY_ID"]
config.secret_access_key_id = ENV["AWS_SECRET_ACCESS_KEY"]
config.bucket = "mybucket"
end

image = Rack::Test::UploadedFile.new("image.jpg", "image/jpg")
url = S3::Put.call(image)

S3::Delete.call('path/to/image.jpg')
```