]> git.parisson.com Git - telemeta.git/commitdiff
add streaming http response
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 20 Jan 2015 09:37:37 +0000 (10:37 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 20 Jan 2015 09:37:37 +0000 (10:37 +0100)
telemeta/views/core.py

index 984e85f231f0445dde1123264f248b63a78562cd..764484cf76ecf0340ac0711a99131ee09a0f189b 100644 (file)
@@ -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