retrospring/config/initializers/25_carrierwave.rb
Georg Gadinger 312fadff2a fix images when not using S3/radosgw
"das system ist das problem, ja?"

fixes #822
2022-12-22 17:29:38 +01:00

16 lines
522 B
Ruby

CarrierWave.configure do |config|
config.fog_credentials = {
:provider => "Local",
:local_root => "#{Rails.root}/public",
}
config.fog_directory = "/"
unless APP_CONFIG["fog"].nil?
config.fog_credentials = APP_CONFIG.dig("fog", "credentials") unless APP_CONFIG.dig("fog", "credentials").nil?
config.fog_directory = APP_CONFIG.dig("fog", "directory") unless APP_CONFIG.dig("fog", "directory").nil?
end
end
CarrierWave::Backgrounder.configure do |c|
c.backend :sidekiq, queue: :carrierwave
end