From: Guillaume Pellerin Date: Tue, 20 Jan 2015 09:37:37 +0000 (+0100) Subject: add streaming http response X-Git-Tag: 1.5~9 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=03be35129b0c29fbb265f9bd5c44aa21a6b36ecb;p=telemeta.git add streaming http response --- diff --git a/telemeta/views/core.py b/telemeta/views/core.py index 984e85f2..764484cf 100644 --- a/telemeta/views/core.py +++ b/telemeta/views/core.py @@ -107,7 +107,7 @@ def send_file(request, filename, content_type='image/jpeg'): iterator for chunks of 8KB. """ wrapper = FixedFileWrapper(file(filename, 'rb')) - response = HttpResponse(wrapper, content_type=content_type) + response = StreamingHttpResponse(wrapper, content_type=content_type) response['Content-Length'] = os.path.getsize(filename) return response