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
generate a file with Django (as an example, some ZIP file)
save it to disk
let server stream it (X-Accel for nginx)
remove the file when it's done
Is it possible to do it with django-downloadview?
Is it recommended to do it with django-downloadview? i.e. should Django stream file contents directly and write nothing to disk? Maybe there are 2 cases: when the file can be generated with some iterator (as a CSV file) VS when the file is generated in a single operation (as a zip archive).
Another use case: file is stored in a storage that nginx can't access. Django could copy file to a temporary location and let nginx serve it. Or maybe the best practice is: "allow nginx to access file storage directly".
=> at least add documentation
=> if a smart solution can be implemented, add it to django-downloadview
The text was updated successfully, but these errors were encountered:
Scenario:
Is it possible to do it with django-downloadview?
Is it recommended to do it with django-downloadview? i.e. should Django stream file contents directly and write nothing to disk? Maybe there are 2 cases: when the file can be generated with some iterator (as a CSV file) VS when the file is generated in a single operation (as a zip archive).
Another use case: file is stored in a storage that nginx can't access. Django could copy file to a temporary location and let nginx serve it. Or maybe the best practice is: "allow nginx to access file storage directly".
=> at least add documentation
=> if a smart solution can be implemented, add it to django-downloadview
The text was updated successfully, but these errors were encountered: