Skip to content

@hishalv /carrierwave_fog.rb
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
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'
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
Something went wrong with that request. Please try again.