]> git.parisson.com Git - telemeta.git/commitdiff
StreamingHttpResponse for item.export
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 19 Dec 2014 09:49:04 +0000 (10:49 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 19 Dec 2014 09:49:04 +0000 (10:49 +0100)
telemeta/views/item.py

index 0daabfa34509ecab62673154b1727716095f3fc8..bd2c408bec11c5cf3eade9f54ae30352747e8834 100644 (file)
@@ -585,10 +585,10 @@ class ItemView(ItemBaseMixin):
                     metadata=None
                 proc.set_metadata(metadata)
 
-                response = HttpResponse(stream_from_processor(decoder, proc, flag), mimetype=mime_type)
+                response = StreamingHttpResponse(stream_from_processor(decoder, proc, flag), content_type=mime_type)
             else:
                 # cache > stream
-                response = HttpResponse(self.cache_export.read_stream_bin(file), mimetype=mime_type)
+                response = StreamingHttpResponse(self.cache_export.read_stream_bin(file), content_type=mime_type)
 
         response['Content-Disposition'] = 'attachment'
         return response