summaryrefslogtreecommitdiff
path: root/app/controllers/files_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-25 23:36:03 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-02-25 23:36:03 +0000
commit0d884ff2b1beae085050fe6729bd88783891fc71 (patch)
treea6b623a0dd9de7e8c540a6c547829c2415912d41 /app/controllers/files_controller.rb
parenta52529f9b6258b2ae2793930096c3fcbe40078f3 (diff)
parent43f1ab9c12630e85861003c424da43314c2768a8 (diff)
downloadgitlab-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.rb19
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