I needed a helper method to download the file from filepicker and figured I'd add it directly here.
I changed the middleware to use it as well because this way the middleware doesn't need to read the whole file in memory. It just downloads to disk and passes the file handler to the Django File object. Might save someone from a DOS attack by uploading a huge file.
Hope it's useful, let me know if you'd rather not merge or need changes.
I needed a helper method to download the file from filepicker and figured I'd add it directly here.
I changed the middleware to use it as well because this way the middleware doesn't need to read the whole file in memory. It just downloads to disk and passes the file handler to the Django File object. Might save someone from a DOS attack by uploading a huge file.
Hope it's useful, let me know if you'd rather not merge or need changes.
Jonas