From 03be35129b0c29fbb265f9bd5c44aa21a6b36ecb Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 20 Jan 2015 10:37:37 +0100 Subject: [PATCH] add streaming http response --- telemeta/views/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5