From ace7cd29710d5d93dc254d31a6a4470f57cb99d8 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Wed, 22 Mar 2017 17:51:05 +0100 Subject: [PATCH] The mimetype argument has been deprecated in HttpResponse in favor of content_type --- telemeta/views/item.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telemeta/views/item.py b/telemeta/views/item.py index c5e59407..1af4b238 100644 --- a/telemeta/views/item.py +++ b/telemeta/views/item.py @@ -304,14 +304,14 @@ class ItemView(ItemBaseMixin): if 'mp4' in extension: mime_type = 'video/mp4' video = item.file.path - response = StreamingHttpResponse(stream_from_file(video), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(video), content_type = mime_type) response['Content-Disposition'] = 'attachment' return response if 'webm' in extension: mime_type = 'video/webm' video = item.file.path - response = StreamingHttpResponse(stream_from_file(video), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(video), content_type = mime_type) response['Content-Disposition'] = 'attachment' return response @@ -349,7 +349,7 @@ class ItemView(ItemBaseMixin): proc.write_metadata() except: pass - response = StreamingHttpResponse(stream_from_file(source), mimetype = mime_type) + response = StreamingHttpResponse(stream_from_file(source), content_type = mime_type) else: media = self.cache_export.dir + os.sep + file if not self.cache_export.exists(file) or not flag.value: -- 2.39.5