cutter: Explicitly set mime type of uploads correctly

pull/158/head
Mike Lang 5 years ago
parent e2f4162ac7
commit 4a2fe7a6ed

@ -154,6 +154,7 @@ class Youtube(UploadBackend):
} }
resp = self.client.request('POST', resp = self.client.request('POST',
'https://www.googleapis.com/upload/youtube/v3/videos', 'https://www.googleapis.com/upload/youtube/v3/videos',
headers={'X-Upload-Content-Type': self.mime_type},
params={ params={
'part': 'snippet,status' if self.hidden else 'snippet', 'part': 'snippet,status' if self.hidden else 'snippet',
'uploadType': 'resumable', 'uploadType': 'resumable',
@ -168,7 +169,6 @@ class Youtube(UploadBackend):
upload_url = resp.headers['Location'] upload_url = resp.headers['Location']
resp = self.client.request( resp = self.client.request(
'POST', upload_url, 'POST', upload_url,
headers={'Content-Type': self.mime_type},
data=data, data=data,
metric_name='upload_video', metric_name='upload_video',
) )

Loading…
Cancel
Save