diff --git a/config/app_config.yml.example b/config/app_config.yml.example index 243dddf87..7be76f8a3 100644 --- a/config/app_config.yml.example +++ b/config/app_config.yml.example @@ -91,6 +91,7 @@ default: #s3_key: 'key' #s3_secret: 'secret' #s3_bucket: 'my_photos' + #s3_region: 'us-east-1' # If you want normal Rails logs, set this to false in the appropriate environment. # It is false by default in development and test. diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index c350a1a2f..41c59c186 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -3,11 +3,12 @@ # the COPYRIGHT file. CarrierWave.configure do |config| - if AppConfig[:s3_key] && AppConfig[:s3_secret] && AppConfig[:s3_bucket] + if AppConfig[:s3_key] && AppConfig[:s3_secret] && AppConfig[:s3_bucket] && AppConfig[:s3_region] config.storage = :s3 config.s3_access_key_id = AppConfig[:s3_key] config.s3_secret_access_key = AppConfig[:s3_secret] config.s3_bucket = AppConfig[:s3_bucket] + config.s3_region = AppConfig[:s3_region] config.s3_use_ssl = true config.cache_dir = "#{Rails.root}/tmp/uploads" else