Created
September 5, 2018 12:30
-
-
Save Whatapalaver/3cef07d7b08a5f6d9fa9913231a79b8b to your computer and use it in GitHub Desktop.
Embeds for medium blog
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/carrierwave.rb | |
CarrierWave.configure do |config| | |
if Rails.env.staging? || Rails.env.production? | |
config.fog_provider = 'fog/aws' | |
config.fog_credentials = { | |
:provider => 'AWS', | |
:aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'], | |
:aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'], | |
:region => 'us-east-2' | |
} | |
config.fog_directory = ENV['S3_BUCKET_NAME'] | |
config.storage = :fog | |
else | |
config.storage = :file | |
config.enable_processing = Rails.env.development? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment