Multipart form POST

X

XY$

Hi,

I have a webpage with a multipart form containing among others two
input fields and one textarea, all three with the same name and all
three being different ways to submit the same data (an identifier of
the data, or a file containing the data, or the actual data). I would
like to submit the form providing data to the textarea and having the
two other fileds empty.

Building query like:
q={"name"=>"", "name"=>"", name="data of some sort"}

and using eg Mechanize to submit the form like that:
resp=agent.post(url,q)

produces error at the server side script.

I'd be thankful for hints how to submit this form.

K
 
S

Shaun Keller

Building query like:
q={"name"=>"", "name"=>"", name="data of some sort"}

Is name defined? Or is it supposed to be in quotes?
Also, the first and second "name" keys will be overwritten by the third.
I don't think this actually raises an error, but if one of the first two
input fields are used, I'm pretty sure the data will be lost.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top