diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-04 20:50:57 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-06-17 11:25:40 -0300 |
commit | 44e1915d4f0e20cf445196ccc7e1d279c75ef0ce (patch) | |
tree | 2619dcea9bf96af77023f8fb9a0b84cd5a8f69ee /config/routes | |
parent | e398409a74db7f3ca1c90d3b056b3a84ebb1b6cf (diff) | |
download | gitlab-ce-44e1915d4f0e20cf445196ccc7e1d279c75ef0ce.tar.gz |
Persist tmp snippet uploads
It persist temporary personal snippets under
user/:id namespaces temporarily while creating
a upload record to track it. If an user gets removed
while it's still a tmp upload, it also gets removed.
If the tmp upload is sent, the upload gets moved to
personal_snippets/:id as before. The upload record
also gets updated to the new model type as well.
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/uploads.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index b594f55f8a0..920f8454ce2 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -7,7 +7,7 @@ scope path: :uploads do # show uploads for models, snippets (notes) available for now get '-/system/:model/:id/:secret/:filename', to: 'uploads#show', - constraints: { model: /personal_snippet/, id: /\d+/, filename: %r{[^/]+} } + constraints: { model: /personal_snippet|user/, id: /\d+/, filename: %r{[^/]+} } # show temporary uploads get '-/system/temp/:secret/:filename', @@ -28,7 +28,7 @@ scope path: :uploads do # create uploads for models, snippets (notes) available for now post ':model', to: 'uploads#create', - constraints: { model: /personal_snippet/, id: /\d+/ }, + constraints: { model: /personal_snippet|user/, id: /\d+/ }, as: 'upload' end |