Created
March 29, 2013 16:56
-
-
Save phlco/5272081 to your computer and use it in GitHub Desktop.
carrier wave init file
This file contains hidden or 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 => ENV['AWSKEY'], # required | |
| :aws_secret_access_key => ENV['AWSSEC'], # required | |
| :region => 'us-east-1' # optional, defaults to 'us-east-1' | |
| } | |
| # config.fog_directory = 'temp-cm' # required | |
| config.fog_public = false # optional, defaults to true | |
| # config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {} | |
| # config.asset_host = 'https://assets.example.com' # optional, defaults to nil | |
| end | |
| CarrierWave.configure {|config| config.fog_directory = 'dev-cm'} if Rails.env.development? | |
| CarrierWave.configure {|config| config.fog_directory = 'test-cm'} if Rails.env.test? | |
| CarrierWave.configure {|config| config.fog_directory = 'prod-cm'} if Rails.env.production? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment