Attachment URL with non-/ relative root
The attachment URL was not working with relative_url_root not equal to '/'. I suggest this fix.
This commit is contained in:
parent
68a9203bce
commit
1072c95180
1 changed files with 4 additions and 0 deletions
|
@ -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}"
|
||||
end
|
||||
|
||||
def url
|
||||
Gitlab.config.gitlab.relative_url_root + '' + super unless super.nil?
|
||||
end
|
||||
|
||||
def file_storage?
|
||||
self.class.storage == CarrierWave::Storage::File
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue