Merge pull request #7349 from srna/patch-1

Attachment URL with non-/ relative root
This commit is contained in:
Valeriy Sizov 2014-11-05 13:11:51 +02:00
commit b37b71d887

View file

@ -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