summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-15 09:49:35 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-15 09:49:35 +0200
commit4821aa6c251a1a2eb4f1fac7bf0f2897a435b48b (patch)
tree9f4426984e7d53208c51cd4902a23c8bd93eb85c /app/uploaders
parenta699ebdbcc11051b9473a88788cf8efdde659975 (diff)
downloadgitlab-ce-4821aa6c251a1a2eb4f1fac7bf0f2897a435b48b.tar.gz
skip protection to aws3
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/attachment_uploader.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
index 3dd2117e339..200700b8810 100644
--- a/app/uploaders/attachment_uploader.rb
+++ b/app/uploaders/attachment_uploader.rb
@@ -21,6 +21,10 @@ class AttachmentUploader < CarrierWave::Uploader::Base
end
def secure_url
- "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
+ if self.class.storage == CarrierWave::Storage::File
+ "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
+ else
+ url
+ end
end
end