Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/uploaders/attachment_uploader.rb')
-rw-r--r--app/uploaders/attachment_uploader.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
index 3dbf2860bd4..3dd2117e339 100644
--- a/app/uploaders/attachment_uploader.rb
+++ b/app/uploaders/attachment_uploader.rb
@@ -19,4 +19,8 @@ class AttachmentUploader < CarrierWave::Uploader::Base
rescue
false
end
+
+ def secure_url
+ "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
+ end
end