- with open(path, "rb") as f:
- response = youtube_call(
- "POST",
- "https://www.googleapis.com/upload/youtube/v3/videos",
- params={'part': part},
- json=data,
- resumable_data=f.read(),
- )
+ response = youtube_call(
+ "POST",
+ "https://www.googleapis.com/upload/youtube/v3/videos",
+ params={'part': part},
+ json=data,
+ resumable_file_path=path,
+ )