diff options
Diffstat (limited to 'app/controllers/files_controller.rb')
-rw-r--r-- | app/controllers/files_controller.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb deleted file mode 100644 index a130bcba9c9..00000000000 --- a/app/controllers/files_controller.rb +++ /dev/null @@ -1,19 +0,0 @@ -class FilesController < ApplicationController - skip_before_filter :authenticate_user!, :reject_blocked - - def download - note = Note.find(params[:id]) - uploader = note.attachment - - if uploader.file_storage? - if can?(current_user, :read_project, note.project) - disposition = uploader.image? ? 'inline' : 'attachment' - send_file uploader.file.path, disposition: disposition - else - not_found! - end - else - redirect_to uploader.url - end - end -end |