summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-20 15:37:37 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-20 15:37:37 +0100
commit218283b368161130f43333e75629870c9649b319 (patch)
treec266f2c98aa3b199569a482fc0a651c484dd486f /config/routes.rb
parent4ef6ffaad3e9b7a29b438722e5e101de78521ec7 (diff)
parent65b125a5035cb021aeb81e168fd4ae1ad6c74c11 (diff)
downloadgitlab-ce-218283b368161130f43333e75629870c9649b319.tar.gz
Merge branch 'extend_markdown_upload' into generic-uploads
# Conflicts: # app/controllers/files_controller.rb # app/controllers/projects/uploads_controller.rb # app/uploaders/attachment_uploader.rb
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/routes.rb b/config/routes.rb
index ca56c2d268e..498716b12e0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -103,11 +103,6 @@ Gitlab::Application.routes.draw do
get 'public/projects' => 'explore/projects#index'
#
- # Attachments serving
- #
- get 'files/:type/:id/:filename' => 'files#download', constraints: { id: /\d+/, type: /[a-z]+/, filename: /.+/ }
-
- #
# Admin Area
#
namespace :admin do
@@ -232,7 +227,6 @@ Gitlab::Application.routes.draw do
put :transfer
post :archive
post :unarchive
- post :upload_image
post :toggle_star
post :markdown_preview
get :autocomplete_sources
@@ -268,6 +262,12 @@ Gitlab::Application.routes.draw do
end
end
+ resources :uploads, only: [:create] do
+ collection do
+ get ":secret/:filename", action: :show, constraints: { filename: /.+/ }
+ end
+ end
+
get '/compare/:from...:to' => 'compare#show', :as => 'compare',
:constraints => { from: /.+/, to: /.+/ }