Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send an image to a flask server using Postman

I need to send an image file to a flask server using Postman.I did send it using a web browser and "render template".But when i tried the same program with postman it showed "method not allowed"

Postman 405.

I also tried /upload, but it says "bad request"

Postman 400

like image 513
VPJ Avatar asked Jan 03 '23 20:01

VPJ


1 Answers

To make this work you'll need this:

  • add upload in your URL in postman.
  • add header Content-Type multipart/form-dataitem
  • enter file as key for row in form data where you choose your file. On the screenshots I see that it is empty.
like image 113
Milan Avatar answered Jan 13 '23 14:01

Milan