I am able to upload videos to Facebook via their Graph API, but unable to upload captions (cc) for those videos. According to their documentation on uploading video captions only the video id, locale, and srt filename must be provided. However, when posting the request
r = requests.post("https://graph.facebook.com/v" + str(self.version) + "/" + path + "?" +
post_data, files={captions_file: open(captions_file, 'rb')})
this is the result:
{"error":{"message":"(#100) Invalid file. Expected file of one of the following types:
application\/octet-stream","type":"OAuthException","code":100}}
My confusion is the documentation specifies the caption file as filename.locale.srt, but the error specifies a file of MIME type application/octet-stream which a .srt file does not apply.
How can a .srt file be sent via application/octet-stream?