summaryrefslogtreecommitdiff
path: root/app/controllers/files_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-19 17:57:27 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-19 17:57:27 +0000
commit19c5c4453598d6ac2d88b15456c9919d3330df88 (patch)
tree0858476b0f6292ee1069c223283d8bc2cb932fc9 /app/controllers/files_controller.rb
parent3c2139ed172c607467ec6cf412d7ed33147bac22 (diff)
parent8184a6564454faf0f9ae9dfee1377c3407d08447 (diff)
downloadgitlab-ce-19c5c4453598d6ac2d88b15456c9919d3330df88.tar.gz
Merge branch 'revert-upload-refactor' into 'master'
Revert upload refactor See merge request !1548
Diffstat (limited to 'app/controllers/files_controller.rb')
-rw-r--r--app/controllers/files_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
index 15523cbc2e7..9671245d3f4 100644
--- a/app/controllers/files_controller.rb
+++ b/app/controllers/files_controller.rb
@@ -5,11 +5,8 @@ class FilesController < ApplicationController
if uploader.file_storage?
if can?(current_user, :read_project, note.project)
- # Replace old notes location in /public with the new one in / and send the file
- path = uploader.file.path.gsub("#{Rails.root}/public", Rails.root.to_s)
-
disposition = uploader.image? ? 'inline' : 'attachment'
- send_file path, disposition: disposition
+ send_file uploader.file.path, disposition: disposition
else
not_found!
end