mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: attachment routes
This commit is contained in:
parent
52d0d4f5ef
commit
73b8cfa7d7
1 changed files with 3 additions and 3 deletions
|
@ -292,10 +292,10 @@ Discourse::Application.routes.draw do
|
|||
|
||||
# used to download original images
|
||||
get "uploads/:site/:sha" => "uploads#show", constraints: { site: /\w+/, sha: /[a-f0-9]{40}/ }
|
||||
# used to download attachments
|
||||
get "uploads/:site/original/:dir1/:dir2/:sha.:extension" => "uploads#show", constraints: { site: /\w+/, dir1: /[a-f0-9]/, dir2: /[a-f0-9]/, sha: /[a-f0-9]{40}/, extension: /\w{2,}/ }
|
||||
# used to dowwload attachments
|
||||
get "uploads/:site/original/:tree/:sha:extension" => "uploads#show", constraints: { site: /\w+/, sha: /[a-f0-9]{40}/, extension: /\.\w{2,}/ }
|
||||
# used to download attachments (old route)
|
||||
get "uploads/:site/:id/:sha.:extension" => "uploads#show", constraints: { site: /\w+/, id: /\d+/, sha: /[a-f0-9]{16}/, extension: /\w{2,}/ }
|
||||
get "uploads/:site/:id/:sha:extension" => "uploads#show", constraints: { site: /\w+/, id: /\d+/, sha: /[a-f0-9]{16}/, extension: /\.\w{2,}/ }
|
||||
|
||||
get "posts" => "posts#latest"
|
||||
get "posts/by_number/:topic_id/:post_number" => "posts#by_number"
|
||||
|
|
Loading…
Reference in a new issue