diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-16 18:42:52 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-16 20:10:15 +0100 |
commit | ebd39fc082b09177e0777e5de5729c3f98495e87 (patch) | |
tree | 3dd9ec9850d9e9ab1a8a4c4ad1e49142c3332315 | |
parent | 7d5f86f6cbd187e75a6ba164ad6bfd036977dd07 (diff) | |
download | gitlab-ce-ebd39fc082b09177e0777e5de5729c3f98495e87.tar.gz |
Nitpicking.
-rw-r--r-- | app/controllers/files_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 561af8084c3..15523cbc2e7 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -5,9 +5,10 @@ class FilesController < ApplicationController if uploader.file_storage? if can?(current_user, :read_project, note.project) - disposition = uploader.image? ? 'inline' : 'attachment' # 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) + path = uploader.file.path.gsub("#{Rails.root}/public", Rails.root.to_s) + + disposition = uploader.image? ? 'inline' : 'attachment' send_file path, disposition: disposition else not_found! |