Forum Discussion
Hey msalvador
yep - as you can from the RAW details of the Postman request - your Content-Type header is set to 'multipart/form-data'.
So - if you set the MediaType combo to 'multipart/form-data' that should sort things
Cheers,
Rich
- 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
- 2 months agooneagh
- 2 months agokadir
Recent Discussions
- 4 days agominhng