mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Support authenticated upload URLs.
Trac #1734 This is implemented by bouncing uploaded file links through a view that checks authentication and redirects to an expiring S3 URL. This makes file uploads return a domain-relative URI. The client converts this to an absolute URI when it's in the composebox, then back to relative when it's submitted to the server. We need the relative URI because the same message may be viewed across {staging,www,zephyr}.zulip.com, which have different cookies. (imported from commit 33acb2abaa3002325f389d5198fb20ee1b30f5fa)
This commit is contained in:
@@ -41,6 +41,8 @@ urlpatterns = patterns('',
|
||||
|
||||
url(r'^activity$', 'zerver.views.get_activity'),
|
||||
|
||||
url(r'^user_uploads/(?P<realm_id>\d*)/(?P<filename>.*)', 'zerver.views.get_uploaded_file'),
|
||||
|
||||
# Registration views, require a confirmation ID.
|
||||
url(r'^accounts/home/', 'zerver.views.accounts_home'),
|
||||
url(r'^accounts/send_confirm/(?P<email>[\S]+)?',
|
||||
|
||||
Reference in New Issue
Block a user