We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5add8f commit 161afdaCopy full SHA for 161afda
app/uploaders/attachment_uploader.rb
@@ -20,9 +20,15 @@ def image?
20
false
21
end
22
23
- def secure_url
24
- "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
25
- end
+ unless Gitlab.config.gitlab.relative_url_root.empty?
+ def secure_url
+ Gitlab.config.gitlab.relative_url_root + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
26
+ end
27
+ else
28
29
+ "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
30
31
32
33
def file_storage?
34
self.class.storage == CarrierWave::Storage::File
0 commit comments