You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To populate file fields, we may wish to upload files that are bigger than the 32mb limit imposed by Cloud Run (which is pretty sensibly chosen).
To circumvent that, django would have to be deployed with an agsi server (typically daphne) and accept cleartext http2 connections per the Cloud Run requirements. It's not clear whether that's yet technically possible with daphne, but we can follow this thread with interest and will ultimately recommend deployment with http2 enabled.
In the meantime (and still afterward, because regardless of http2 compatibility, it doesn't make sense to be passing large files through your servers), we need to support a pattern in which files can be uploaded direct to bucket without choking your django server.
Proposed solution
What we need is:
a way to provide the client with a pre-signed upload url when rendering ADD or CHANGE actions in the admin or other views
client-side JS that executes the upload using that url, rather than uploading the file with the form data
a widget that works in both wagtail and django-admin to implement this
a storage class and/or model FileField that allows creation of files in this way
Some hints
The django-direct-cloud-upload library has already achieved this, so strong inspiration should be taken from there, and we can probably reuse some code under their BSD3 license. However, it doesn't work with a 'normal' file field out of the box (so it's not a drop-in replacement, depending on how you later use the model or forms). There are also a number of setup steps that I think we can ease by providing a model field directly.
The text was updated successfully, but these errors were encountered:
Feature request
Use Case
To populate file fields, we may wish to upload files that are bigger than the 32mb limit imposed by Cloud Run (which is pretty sensibly chosen).
To circumvent that, django would have to be deployed with an agsi server (typically daphne) and accept cleartext http2 connections per the Cloud Run requirements. It's not clear whether that's yet technically possible with daphne, but we can follow this thread with interest and will ultimately recommend deployment with http2 enabled.
In the meantime (and still afterward, because regardless of http2 compatibility, it doesn't make sense to be passing large files through your servers), we need to support a pattern in which files can be uploaded direct to bucket without choking your django server.
Proposed solution
What we need is:
Some hints
The text was updated successfully, but these errors were encountered: