I'm having a bit of a problem putting some pieces together in an app I'm building. I'm using React-Native, and have the camera storing an image.
There are two ways I can get Microsoft's Face API to evaluate an image:
- External URL
octet-stream
Since the app does not upload the photo from your mobile phone to a server, I have to rely on octet-stream
. Unfortunately, Microsoft does not have documentation on how to do this in JavaScript.
At this point, I just have the fetch
API to do all my network requests. I've been looking online for tutorials, but can't figure out how to orchestrate these steps:
- Camera takes an image and stores it in a local file (I can grab the file path to the image -- this step is good).
- Use
fetch
usingoctet-stream
to send the file to the Face API.
Using octet-stream
, does this mean I need to use a Buffer
object to read the file and place it into the fetch
request?
Thanks for any and all help!