Issue
How to use POSTMAN for Multipart/form-data which has customize header for testing my controller which takes 2 files as parameter (public ... controller( MultipartFile[] files)
)?
POST .... HTTP/1.1
.
.
.
---boundary123
Content-type:application/octet-stream
content-Disposition: form-data filenale="abc.txt" name="someuniquename"
[paylaod content](this is in xml format)
---boundary123
content-type:application/json
content-Disposition:form-data name="metadata"
{ID:"999"}
---boundary123
Solution
Steps to use 'Multipart/form-data ' in Postman
- Create a new tab
- Insert controller Url
- Set method type as POST
- Under Body tab, select form-data
- For each key that is a file, set Value type as File
Answered By - Afridi
Answer Checked By - Robin (JavaFixing Admin)