mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4615 from techAPJ/master
FIX: make upload extension optional in route
This commit is contained in:
commit
b7a23eba06
@ -384,9 +384,9 @@ Discourse::Application.routes.draw do
|
||||
post "uploads" => "uploads#create"
|
||||
|
||||
# used to download original images
|
||||
get "uploads/:site/:sha.:extension" => "uploads#show", constraints: { site: /\w+/, sha: /\h{40}/, extension: /[a-z0-9\.]+/i }
|
||||
get "uploads/:site/:sha(.:extension)" => "uploads#show", constraints: { site: /\w+/, sha: /\h{40}/, extension: /[a-z0-9\.]+/i }
|
||||
# used to download attachments
|
||||
get "uploads/:site/original/:tree:sha.:extension" => "uploads#show", constraints: { site: /\w+/, tree: /([a-z0-9]+\/)+/i, sha: /\h{40}/, extension: /[a-z0-9\.]+/i }
|
||||
get "uploads/:site/original/:tree:sha(.:extension)" => "uploads#show", constraints: { site: /\w+/, tree: /([a-z0-9]+\/)+/i, sha: /\h{40}/, extension: /[a-z0-9\.]+/i }
|
||||
# used to download attachments (old route)
|
||||
get "uploads/:site/:id/:sha" => "uploads#show", constraints: { site: /\w+/, id: /\d+/, sha: /\h{16}/ }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user