diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-04 10:47:10 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-04 10:47:10 +0000 |
commit | ba608dc0f2c2377f7ca2095a8bc4e5d44921b67f (patch) | |
tree | a5540d9278c738f216f2bdc2f4a290c2a5e75cf7 /config/routes | |
parent | ef71bf6278759aafb1a480916cfafb9c9650eddc (diff) | |
parent | 43ff7386411af0f538710f3627622f71e5e34472 (diff) | |
download | gitlab-ce-ba608dc0f2c2377f7ca2095a8bc4e5d44921b67f.tar.gz |
Merge branch '12910-uploader-pers-snippet' into 'master'
Prepare uploaders for personal snippets comments
See merge request !11022
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/uploads.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index 2b22148a134..b315186b178 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -4,6 +4,11 @@ scope path: :uploads do to: "uploads#show", constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /[^\/]+/ } + # show uploads for models, snippets (notes) available for now + get ':model/:id/:secret/:filename', + to: 'uploads#show', + constraints: { model: /personal_snippet/, id: /\d+/, filename: /[^\/]+/ } + # Appearance get ":model/:mounted_as/:id/:filename", to: "uploads#show", @@ -13,6 +18,12 @@ scope path: :uploads do 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: /[^\/]+/ } + + # create uploads for models, snippets (notes) available for now + post ':model/:id/', + to: 'uploads#create', + constraints: { model: /personal_snippet/, id: /\d+/ }, + as: 'upload' end # Redirect old note attachments path to new uploads path. |