Created
September 5, 2018 12:35
-
-
Save Whatapalaver/55e31db7a73ad612ac04f1495ad22940 to your computer and use it in GitHub Desktop.
medium blog embeds
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'] | |
} | |
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