Forum Discussion
Hi Richie,
in postman is a form:data.
in ReadyAPI I set Mediatype= multipart/form-data
Hi msalvador
yeah - the radio button to set the type in Postman is entitled as 'form-data' - but if you look at the RAW details of the request - the Content-Type header will say 'multipart/form-data'
Thats what you need to populate the MediaType dropdown with
If you're still struggling - once I've finished work, I'll setup a VIRT to match your URI string and set it up in ReadyAPI and screenshot it so you know what I did.
Cheers,
Rich
- msalvador3 years agoFrequent ContributorAuthorization: Basic Q1BEVEhQODdBMDFJNzI1UDo2NzQ0NTYwMw==User-Agent: PostmanRuntime/7.28.4Accept: */*Postman-Token: 3741f70b-d8c2-4d40-9339-de2df80304b3Host: xx.xx.itAccept-Encoding: gzip, deflate, brConnection: keep-aliveContent-Type: multipart/form-data; boundary=--------------------------461373579186026720762425Content-Length: 818365
- richie3 years agoCommunity Hero
Hey msalvador
did you remember to set the following?:
I'm rushing here - so I'll try and update these instructions later - but here's what I'd do if I had a repeating 'File' query parm on a request that and Id need to attach files
1. Via the API config section, highlight the API, select the File parameter (in the listing) - and in the 'Advanced Options' expandable section of the API config, enable "Disables URL Encoding of the parameter value" at bottom of the 'Advanced Options' section
2. Via the Request Properties (bottom left of your screen), find the 'Multi-Value Delimiter' and input \| in the 'Value' field3. Via the parameter listing - within the 'Request' form (that lists all the parameters) find the 'File' parm - and within the 'Value' field input file:File1.png | file:File2.png | file:File3.png
4. Make sure your MediaType is set to 'multipart/form-data'
5. Make sure you tick the 'Post QueryString' checkbox (I'm hoping your File parm are Query Parms or this wont work) - I'll have to double check later as Im in a bit of a rush
6. at the bottom of the screen on the API config there are some tabs - 'Auth', 'Attachments', 'Representations' and 'Headers' - select the 'Attachments' tab
7. click on the green plus button to add in File1.png, select 'Yes' to cache the file.
8. In the 'ContentID' field in the 'Attachments' input the Query parameter name - i.e. 'File'
9. Repeat the last two steps (steps 7 and 😎 for each of the files you need to add
Then give you the API a poke and see what happens - check the RAW request content if there's a problem - but I think I've got the setup you need
Cheers,
Rich
Related Content
- 10 years agomurugans1011