Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes/uploads.rb')
-rw-r--r--config/routes/uploads.rb22
1 files changed, 14 insertions, 8 deletions
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index 52c67a705dc..4108d4675a5 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -3,8 +3,8 @@
scope path: :uploads do
# Note attachments and User/Group/Project/Topic avatars
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: %r{note|user|group|project|projects\/topic|achievements\/achievement}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} }
+ to: "uploads#show",
+ constraints: { model: %r{note|user|group|project|projects\/topic|achievements\/achievement}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} }
# show uploads for models, snippets (notes) available for now
get '-/system/:model/:id/:secret/:filename',
@@ -18,9 +18,9 @@ scope path: :uploads do
# Appearance
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: /appearance/, mounted_as: /logo|header_logo|pwa_icon|favicon/, filename: /.+/ },
- as: 'appearance_upload'
+ to: "uploads#show",
+ constraints: { model: /appearance/, mounted_as: /logo|header_logo|pwa_icon|favicon/, filename: /.+/ },
+ as: 'appearance_upload'
# create uploads for models, snippets (notes) available for now
post ':model',
@@ -34,9 +34,15 @@ scope path: :uploads do
# Alert Metric Images
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} },
- as: 'alert_metric_image_upload'
+ to: "uploads#show",
+ constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} },
+ as: 'alert_metric_image_upload'
+
+ # Abuse Reports Images
+ get "-/system/:model/:mounted_as/:id/:filename",
+ to: "uploads#show",
+ constraints: { model: /abuse_report/, mounted_as: /screenshot/, filename: %r{[^/]+} },
+ as: 'abuse_report_upload'
end
# Redirect old note attachments path to new uploads path.