Re: Returning large files from a view

2009-01-07 Thread Graham Dumpleton
Ultimately what they really need is: View-03 wsgi.file_wrapper for large file serving from: http://code.djangoproject.com/wiki/Version1.1Features At least then it will be optimal for WSGI case. Graham On Jan 8, 10:42 am, bruno desthuilliers wrote: > On 8 jan, 00:15, bruno desthuil

Re: Returning large files from a view

2009-01-07 Thread bruno desthuilliers
On 8 jan, 00:15, bruno desthuilliers wrote: > On 7 jan, 23:37, David Lindquist wrote: > > > I would like to return a binary file from a view, and so far I have > > something like this: > > > def my_file(request): > > file_data = open("/path/to/file", "rb").read() > > response = Http

Re: Returning large files from a view

2009-01-07 Thread David Lindquist
On Jan 7, 2009, at 4:15 PM, bruno desthuilliers wrote: > > On 7 jan, 23:37, David Lindquist wrote: >> I would like to return a binary file from a view, and so far I have >> something like this: >> >> def my_file(request): >> file_data = open("/path/to/file", "rb").read() >> response =

Re: Returning large files from a view

2009-01-07 Thread bruno desthuilliers
On 7 jan, 23:37, David Lindquist wrote: > I would like to return a binary file from a view, and so far I have > something like this: > > def my_file(request): > file_data = open("/path/to/file", "rb").read() > response = HttpResponse(file_data, mimetype="application/ > whatever") >