attach multiple file into one property
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
attach multiple file into one property
Hi guys,
I'm trying to post multiple files that use the same property.
Property name is:"file"
Files to upload:"HP.png,HP1.png,etc..."
So file=>HP.png,HP1.png
For semplicity I post both postman screenshot(that works) and ReadyAPI screenshot(that don't works).
What I want to do is reply postman request into ReadyAPI
Any idea?
Thanks in advance
- Labels:
-
Function Tests
-
REST
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @msalvador
Can you please reattach the screen grabs you embedded please? They're tiny and I cant see them - even when I download them.
If you use the attach function rather than embed function - I find that helps with screengrab sizes sometimes
ta
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @msalvador
Im still unsure what you're after - but I think (considering the screenshot), you want to have multiple URI parms (either URI or query) with the identical names (but different values).
If my above guess IS correct, check out --> https://community.smartbear.com/t5/ReadyAPI-Questions/how-to-pass-more-then-one-parameter-in-soapUI-...
This tells you how to do it and definitely works cos I've done it before myself!
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Richie,
thank you for the reply, I tried but without success.
Problem is on file parameter. Syntax for sending files is
Parameter Value
file file:HP.png
I tried
Parameter Value
file file:HP.png|file:HP1.png
Parameter Value
file file:HP.png|HP1.png
but it doesn't work
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @msalvador
what's the mediaType value you're setting? What's the Content-Type header for your successful request in Postman?
I'm guessing that you need to set the MediaType combo box to either 'x-www-form-urlencoded' or the 'form-data' option to replicate the Content-Type header generated on the successful request in Postman
If my memory is correct - the x-www-form-urlencoded doesnt work for files - I think - it's been quite a while since I attached a file.
So! - short answer - "I think" again going on memory here, I think the value you need to stick on the MediaType combo is 'multipart/form-data' - if you've setup correctly then this should work.
cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Richie,
in postman is a form:data.
in ReadyAPI I set Mediatype= multipart/form-data
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
