0

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 ?

davidism
  • 110,080
  • 24
  • 357
  • 317
  • What have you researched? In the interest of content quality, Stack Overflow doesn't permit posting of duplicative questions. In the future, please use the search functionality above or your preferred search engine to research your inquiry before posting here. Duplicate of [Convert cURL request to request of node.js](https://stackoverflow.com/questions/30491525/convert-curl-request-to-request-of-node-js/51437427) and [NodeJS: sending/uploading a local file to a remote server](https://stackoverflow.com/questions/19818918/nodejs-sending-uploading-a-local-file-to-a-remote-server), among others. – esqew Jul 13 '21 at 17:15

0 Answers0