Last active
December 5, 2015 04:23
-
-
Save taptapdan/6dde1e89acc052ac7ca8 to your computer and use it in GitHub Desktop.
RailsTutorial Chapter 10 // Configuring CarrierWave to use S3 // config/initializers/carrier_wave.rb
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
| # config/initializers/carrier_wave.rb | |
| if Rails.env.production? | |
| CarrierWave.configure do |config| | |
| config.fog_credentials = { | |
| # Configuration for Amazon S3 | |
| :provider => 'AWS', | |
| :aws_access_key_id => ENV['S3_ACCESS_KEY'], | |
| :aws_secret_access_key => ENV['S3_SECRET_KEY'], | |
| :region => ENV['S3_REGION'] | |
| } | |
| config.fog_directory = ENV['S3_BUCKET'] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment