]> git.parisson.com Git - telemeta.git/commitdiff
The mimetype argument has been deprecated in HttpResponse in favor of content_type
authorThomas Fillon <thomas@parisson.com>
Wed, 22 Mar 2017 16:51:05 +0000 (17:51 +0100)
committerThomas Fillon <thomas@parisson.com>
Wed, 22 Mar 2017 16:51:05 +0000 (17:51 +0100)
telemeta/views/item.py

index c5e594079d0093f60fa8b86ef6899d06efce4236..1af4b238bbb58ecc1da3bc6a35fef2cf17c49c7a 100644 (file)
@@ -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: