From 4a2fe7a6edfcaac825211bf203d2663ca9fd41ea Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 10 Nov 2019 00:17:25 -0800 Subject: [PATCH] cutter: Explicitly set mime type of uploads correctly --- cutter/cutter/upload_backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cutter/cutter/upload_backends.py b/cutter/cutter/upload_backends.py index cc54dcb..49fd528 100644 --- a/cutter/cutter/upload_backends.py +++ b/cutter/cutter/upload_backends.py @@ -154,6 +154,7 @@ class Youtube(UploadBackend): } resp = self.client.request('POST', 'https://www.googleapis.com/upload/youtube/v3/videos', + headers={'X-Upload-Content-Type': self.mime_type}, params={ 'part': 'snippet,status' if self.hidden else 'snippet', 'uploadType': 'resumable', @@ -168,7 +169,6 @@ class Youtube(UploadBackend): upload_url = resp.headers['Location'] resp = self.client.request( 'POST', upload_url, - headers={'Content-Type': self.mime_type}, data=data, metric_name='upload_video', )