diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index a79187b6cf..92d3f2784f 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -39,12 +39,12 @@ module CarrierWave # Ensure that the provider AWS is uppercased provider = credentials[:provider] || 'AWS' if [:aws, 'aws'].include? provider - provider = 'AWS' + credentials[:provider] = 'AWS' end CarrierWave.configure do |config| config.fog_provider = 'fog/aws' - config.fog_credentials = { provider: provider }.merge(credentials) + config.fog_credentials = credentials config.fog_directory = directory config.fog_public = public diff --git a/lib/open_project/configuration/helpers.rb b/lib/open_project/configuration/helpers.rb index dbb93daeec..b08581795a 100644 --- a/lib/open_project/configuration/helpers.rb +++ b/lib/open_project/configuration/helpers.rb @@ -92,7 +92,11 @@ module OpenProject end def remote_storage_hosts - [remote_storage_upload_host, remote_storage_download_host].compact + [ + fog_credentials[:host], + remote_storage_upload_host, + remote_storage_download_host + ].compact end def attachments_storage_path