How do I use Postman to send queries with body (in json format) and files (in multipart) format at the same time?
I think I should use Postman->Body->Raw although I can't find an example on the Web. Anyone can kindly teach me? Thank you!
CodePudding user response:
In postman, set method type to POST.
Then select Body -> form-data -> Enter your parameter name (file according to your code)
On the right side of the Key field, while hovering your mouse over it, there is a dropdown menu to select between Text/File. Select File, then a "Select Files" button will appear in the Value field.
For rest of JSON data, you can click on raw and enter your JSON data there.