summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:31:19 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:31:19 +0200
commita699ebdbcc11051b9473a88788cf8efdde659975 (patch)
tree05528b1407ed5375809d2cb936b7ebbcf647721a /app/uploaders
parentab0cfc00367a60cfe9cc488521bf55882d54769a (diff)
downloadgitlab-ce-a699ebdbcc11051b9473a88788cf8efdde659975.tar.gz
handle attahcment with send_file
Diffstat (limited to 'app/uploaders')
-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