2012-11-19 19:43:42 +00:00
|
|
|
CarrierWave.configure do |config|
|
2013-12-09 22:55:12 +00:00
|
|
|
if CFG.carrierwave_storage == 'fog'
|
2012-11-19 19:43:42 +00:00
|
|
|
config.storage = :fog
|
|
|
|
|
2012-03-10 16:05:45 +00:00
|
|
|
config.fog_credentials = {
|
|
|
|
:provider => 'AWS',
|
2013-12-09 22:55:12 +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
|
|
|
}
|
2013-12-09 22:55:12 +00:00
|
|
|
config.fog_directory = CFG.aws_bucket
|
2015-04-27 08:08:46 +00:00
|
|
|
config.fog_public = false
|
2016-04-10 12:06:48 +00:00
|
|
|
elsif CFG.carrierwave_storage == 'file'
|
|
|
|
config.root = Rails.root
|
2012-11-19 19:43:42 +00:00
|
|
|
end
|
2012-03-10 16:05:45 +00:00
|
|
|
end
|
2016-04-10 12:06:48 +00:00
|
|
|
|
|
|
|
if File.exists?(Rails.root.to_s + "/public/uploads/asciicast")
|
|
|
|
raise "Please move all directories from ./public/uploads/ to ./uploads/"
|
|
|
|
end
|