Skip to content
Snippets Groups Projects
Commit 1072c951 authored by Tomas Srna's avatar Tomas Srna
Browse files

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
No related branches found
No related tags found
Loading
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment