Created
September 12, 2011 17:45
-
-
Save hishalv/1211887 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CarrierWave.configure do |config| | |
config.fog_credentials = { | |
:provider => 'AWS', # required | |
:aws_access_key_id => 'my_access_key', # required | |
:aws_secret_access_key => 'my_secret_access_key', # required | |
:region => 'us-east-1' # optional, defaults to 'us-east-1' | |
} | |
config.fog_directory = 'my_bucket_name' # required | |
config.fog_host = 'https://my_bucket_name.s3.amazonaws.com' # optional, defaults to nil | |
config.fog_public = false # optional, defaults to true | |
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {} | |
config.max_file_size = 30.megabytes # defaults to 5.megabytes | |
config.upload_expiration = 30.minutes # defaults to 10.hours | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.9' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2', '~> 0.2.6' | |
gem 'rake', '0.8.7' | |
gem "aws-s3", :require => 'aws/s3' | |
gem 'carrierwave' | |
gem 'carrierwave_direct' | |
gem 'nokogiri' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImageUploader < CarrierWave::Uploader::Base | |
#storage :fog | |
include CarrierWaveDirect::Uploader | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment