mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
Serve uploaded files through get_uploaded_file in development.
Previously, uploaded files were served: * With S3UploadBackend, via get_uploaded_file (redirects to S3) * With LocalUploadBackend in production, via nginx directly * With LocalUploadBackend in development, via Django's static file server This changes that last case to use get_uploaded_file in development, which is a key step towards being able to do proper access control authorization. Does not affect production.
This commit is contained in:
@@ -98,8 +98,6 @@ if settings.DEVELOPMENT and settings.LOCAL_UPLOADS_DIR is not None:
|
||||
urlpatterns += patterns('',
|
||||
url(r'^user_avatars/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': os.path.join(settings.LOCAL_UPLOADS_DIR, "avatars")}),
|
||||
url(r'^user_uploads/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': os.path.join(settings.LOCAL_UPLOADS_DIR, "files")}),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('zerver.views',
|
||||
|
||||
Reference in New Issue
Block a user