fix images when not using S3/radosgw

"das system ist das problem, ja?"

fixes #822
This commit is contained in:
Georg Gadinger 2022-12-21 10:43:32 +00:00 committed by Andreas Nedbal
parent de746419b7
commit 312fadff2a
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class BaseUploader < CarrierWave::Uploader::Base
end
def paperclip_path
return "/system/users/:attachment/:id_partition/:style/:basename.:extension" if APP_CONFIG["fog"].blank?
return "/users/:attachment/:id_partition/:style/:basename.:extension" if APP_CONFIG["fog"].blank?
"users/:attachment/:id_partition/:style/:basename.:extension"
end

View File

@ -3,7 +3,7 @@ CarrierWave.configure do |config|
:provider => "Local",
:local_root => "#{Rails.root}/public",
}
config.fog_directory = "/system"
config.fog_directory = "/"
unless APP_CONFIG["fog"].nil?
config.fog_credentials = APP_CONFIG.dig("fog", "credentials") unless APP_CONFIG.dig("fog", "credentials").nil?