Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-02-14 18:04:45 +0300
committerDouwe Maan <douwe@gitlab.com>2015-02-18 00:20:44 +0300
commit9bf8480b4a0d3ea6e284c4bd8bf26243f3f3f6f5 (patch)
tree2365d68b1905ddce4d20f226f9e888c29bc0dcf4 /config
parent0da0d800f2a0db9d9c16cf5e2feb0dd80b528223 (diff)
Generalize the image upload in markdown
This commit generalizes the image upload via drag and drop so it supports all files. It also adds access control for these files.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 65786d83566..bd659ddeabd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -93,7 +93,8 @@ Gitlab::Application.routes.draw do
#
# Attachments serving
#
- get 'files/:type/:id/:filename' => 'files#download', constraints: { id: /\d+/, type: /[a-z]+/, filename: /.+/ }
+ get 'files/:type/:id/:filename' => 'files#download_notes', constraints: { id: /\d+/, type: /[a-z]+/, filename: /.+/ }
+ get 'files/:namespace/:project/:folder_id/:filename' => 'files#download_files', constraints: { namespace: /[^\/]+/, project: /[a-zA-Z.\/0-9_\-]+/, filename: /.+/ }
#
# Admin Area
@@ -220,7 +221,7 @@ Gitlab::Application.routes.draw do
put :transfer
post :archive
post :unarchive
- post :upload_image
+ post :upload_file
post :toggle_star
post :markdown_preview
get :autocomplete_sources