I have a deep learning model running on flask in an local edge device that listens to a route /dpu_models/image for POST requests containing an image and then triggers inference on the image by feeding it to the model.
I can trigger inference from command line by
curl -X POST -F image=@xray.png 'http://<device_ip>/dpu_models/image'
My web app already handles the image uploading part by uploading the files to a local directory and preparing a list of them with a "Get inference" button on the frontend corresponding to each file.
Now , I want to achieve the same with a file I upload using my Node-JS web app , and then call to the flask server with the image in a POST request. What is the procedure to do this in node as done in cURL ?