Postman, Python and passing images and metadata to a web service

后端 未结 2 820
醉酒成梦
醉酒成梦 2020-12-18 08:28

this is a two-part question: I have seen individual pieces discussed, but can\'t seem to get the recommended suggestions to work together. I want to create a web service to

2条回答
  •  甜味超标
    2020-12-18 08:55

    Make sure `request.files['Image'] contains the image you are sending and follow http://flask.pocoo.org/docs/1.0/patterns/fileuploads/ to save the file to your file system. Something like

    file = request.files['Image']
    file.save('./test_image.jpg')
    

    might do what you want, while you will have to work out the details of how the file should be named and where it should be placed.

提交回复
热议问题