Reputation: 401
I'm trying to send a list of objects to my server with Postman. However, I can't find information about how to send images in Postman using the Raw option. I'm thinking of trying something like this:
[
{
"name": "image1",
"file": "(i don't know what to type here)"
},
{
"name": "image2",
"file": "(i don't know what to type here)"
}
]
Any help will be highly appreciated.
Upvotes: 0
Views: 642
Reputation: 306
If you have a specific use case for uploading using Raw, then you can encode your images to base64 and send in JSON that way. See this answer for more info: Answer
An easier way to do this is to use form-data, and select File instead of Text. Then, you can select 1 or more files to send in the body.
Postman docs for sending data: Docs
Upvotes: 2