Commit 1072c951 authored by Tomas Srna's avatar Tomas Srna

Attachment URL with non-/ relative root

The attachment URL was not working with relative_url_root not equal to '/'. I suggest this fix.
parent 68a9203b
...@@ -26,6 +26,10 @@ class AttachmentUploader < CarrierWave::Uploader::Base ...@@ -26,6 +26,10 @@ class AttachmentUploader < CarrierWave::Uploader::Base
Gitlab.config.gitlab.relative_url_root + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}" Gitlab.config.gitlab.relative_url_root + "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
end end
def url
Gitlab.config.gitlab.relative_url_root + '' + super unless super.nil?
end
def file_storage? def file_storage?
self.class.storage == CarrierWave::Storage::File self.class.storage == CarrierWave::Storage::File
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment