diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-20 15:56:12 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-20 16:01:37 +0100 |
commit | 7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5 (patch) | |
tree | 4c4e79d21dc6d2ec0d280debfc0b469d92f27725 /config/routes.rb | |
parent | 218283b368161130f43333e75629870c9649b319 (diff) | |
download | gitlab-ce-7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5.tar.gz |
Fix URL to uploaded file.
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |