I need to send video from disk to Cognitive Services Emotion. I have almost done, but I was not capable to figure out how to format body properly and I can´t use '{url: http://...}' because I can´t expose the videos I want to submit. My code:
$.ajax({
"headers":{
"Content-Type":"application/octet-stream",
"Ocp-Apim-Subscription-Key":"SECRET"
},
type: "POST",
url: url,
"data": JSON.stringify({video: data}),
success: (x,stat,res) => {
},
error: (res) => {
}
});
As you can see I´ve tried to use 'octet-stream' to send the video. And that is one of many ways I did it. I don´t know if I need to send a JSON(similar when you send url) or do something else. I couldn´t find anything about it on official documentation. Help??
Thanks!