I am trying to find the best way (most efficient way) to return large files from Django back to an http client.
- receive http get request
- read large file from disk
- return the content of that file
I don’t want to read the file then post the response using HttpResponse as the file content is first stored in RAM if I am correct. How can I do that efficiently ?
Laurent
Look into mod_xsendfile on Apache (or equivalents for nginx, etc) if you like to use Django for authentication. Otherwise, there’s no need to hit django, and just server straight from Apache.