2012-11-19 19:43:42 +00:00
|
|
|
CarrierWave.configure do |config|
|
|
|
|
if CFG['CARRIERWAVE_STORAGE'] == :fog
|
|
|
|
config.storage = :fog
|
|
|
|
|
2012-03-10 16:05:45 +00:00
|
|
|
config.fog_credentials = {
|
|
|
|
:provider => 'AWS',
|
2012-06-09 14:11:29 +00:00
|
|
|
:aws_access_key_id => CFG['AWS_ACCESS_KEY_ID'],
|
|
|
|
:aws_secret_access_key => CFG['AWS_SECRET_ACCESS_KEY'],
|
|
|
|
:region => CFG['AWS_REGION']
|
2012-03-10 16:05:45 +00:00
|
|
|
}
|
2012-06-09 14:11:29 +00:00
|
|
|
config.fog_directory = CFG['AWS_BUCKET']
|
2012-11-19 19:43:42 +00:00
|
|
|
else
|
|
|
|
config.storage = :file
|
|
|
|
end
|
|
|
|
|
|
|
|
if Rails.env.test?
|
|
|
|
config.storage = :file
|
|
|
|
config.enable_processing = false
|
2012-03-10 16:05:45 +00:00
|
|
|
end
|
|
|
|
end
|