Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

imnotquitejack/images_on_s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImagesOnS3
==========

This plugin is meant to be a super-simple way to store images on S3.

* Requires 'aws-s3' gem
* Requires 'rmagick' gem
* Make sure that the object's view has an "uploaded_data" form field.
* Make sure "config/amazon_s3.yml" exists.
# TODO: Copy amazon_s3.yml.tpl to config directory on installation 


Example
=======

class Photo < ActiveRecord::Base
  has_images_on_s3 :sizes => { :full => '640x480>' }, :keep_original => true
  # Must have these fields: filename, content_type 
  # Optional fields: width, height, size
end


class PhotosController < ApplicationController
  def create
    @photo = Photo.create( params[:photo] )
  end
end

@photo.public_url(:full)
@photo.public_url(:original)
@photo.public_url == @photo.public_url(:original)


Copyright (c) 2010 [email protected], released under the MIT license

About

Easily store images on Amazon's S3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages