diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-25 23:36:03 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-02-25 23:36:03 +0000 |
commit | 0d884ff2b1beae085050fe6729bd88783891fc71 (patch) | |
tree | a6b623a0dd9de7e8c540a6c547829c2415912d41 /app/controllers/files_controller.rb | |
parent | a52529f9b6258b2ae2793930096c3fcbe40078f3 (diff) | |
parent | 43f1ab9c12630e85861003c424da43314c2768a8 (diff) | |
download | gitlab-ce-0d884ff2b1beae085050fe6729bd88783891fc71.tar.gz |
Merge branch 'extend_markdown_upload' into 'master'
Generalizes image upload in drag and drop in markdown to all files
From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger.
- [x] Rebase on master when !1553 is merged in
See merge request !1530
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 |