From 7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 20 Feb 2015 15:56:12 +0100 Subject: Fix URL to uploaded file. --- config/routes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/routes.rb') diff --git a/config/routes.rb b/config/routes.rb index 498716b12e0..b6f58acf1a6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -79,8 +79,8 @@ Gitlab::Application.routes.draw do constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /.+/ } # Project markdown uploads - get ":id/:secret/:filename", to: "projects/uploads#show", - constraints: { id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ } + get ":project_id/:secret/:filename", to: "projects/uploads#show", + constraints: { project_id: /[a-zA-Z.0-9_\-]+\/[a-zA-Z.0-9_\-]+/, filename: /.+/ } end # @@ -264,7 +264,7 @@ Gitlab::Application.routes.draw do resources :uploads, only: [:create] do collection do - get ":secret/:filename", action: :show, constraints: { filename: /.+/ } + get ":secret/:filename", action: :show, as: :show, constraints: { filename: /.+/ } end end -- cgit v1.2.1