diff options
author | Hannes Rosenögger <123haynes@gmail.com> | 2015-02-14 16:04:45 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-17 22:20:44 +0100 |
commit | 9bf8480b4a0d3ea6e284c4bd8bf26243f3f3f6f5 (patch) | |
tree | 2365d68b1905ddce4d20f226f9e888c29bc0dcf4 /config/routes.rb | |
parent | 0da0d800f2a0db9d9c16cf5e2feb0dd80b528223 (diff) | |
download | gitlab-ce-9bf8480b4a0d3ea6e284c4bd8bf26243f3f3f6f5.tar.gz |
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/routes.rb')
-rw-r--r-- | config/routes.rb | 5 |
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 |