Commit b37b71d8 authored by Valeriy Sizov's avatar Valeriy Sizov

Merge pull request #7349 from srna/patch-1

Attachment URL with non-/ relative root
parents 42a1d808 733012cb
...@@ -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