Merge pull request #639 from cyberkov/add-region-selection-for-s3
Added region config to carrierwave to select other regions than US
This commit is contained in:
commit
ee1c394aa2
2 changed files with 3 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue