Redirect legacy URLs to their new secure location.

URLs with a realm of "unk" will be queried against the new bucket to
determine the relevant realm of the uploading user.

(imported from commit 5d39801951face3cc33c46a61246ba434862a808)
This commit is contained in:
Luke Faraone
2014-05-05 18:48:23 -07:00
parent ef8b6e5a42
commit 8f8b2519ea
3 changed files with 21 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ urlpatterns += patterns('zerver.views',
url(r'^api/v1/external/freshdesk$', 'webhooks.api_freshdesk_webhook'),
url(r'^api/v1/external/zendesk$', 'webhooks.api_zendesk_webhook'),
url(r'^user_uploads/(?P<realm_id>\d*)/(?P<filename>.*)', 'rest_dispatch',
url(r'^user_uploads/(?P<realm_id>(\d*|unk))/(?P<filename>.*)', 'rest_dispatch',
{'GET': 'get_uploaded_file'}),
)