summaryrefslogtreecommitdiff
path: root/config/routes/uploads.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/uploads.rb')
-rw-r--r--config/routes/uploads.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index 096ef146e07..fb8af76397c 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -21,9 +21,11 @@ scope path: :uploads do
as: 'appearance_upload'
# Project markdown uploads
+ # DEPRECATED: Remove this in GitLab 13.0 because this is redundant to show_namespace_project_uploads
+ # https://gitlab.com/gitlab-org/gitlab/issues/196396
get ":namespace_id/:project_id/:secret/:filename",
- to: "projects/uploads#show",
- constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }
+ to: redirect("%{namespace_id}/%{project_id}/uploads/%{secret}/%{filename}"),
+ constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil }
# create uploads for models, snippets (notes) available for now
post ':model',