C
cerr
Hi,
I want to use http post to upload data to a webserver but I want to pass multiple arguments within the post i.e.
I know that you can load one item (data)in there like this:
data = {"data"pen(filename,"rb")}
response = opener.open(url, data, timeout=TIMEOUT)
but now I want multiple so I tried this:
multipart = ({"data":data}, {"fname":fname}, {"f":f})
response = opener.open(url, multipart, timeout=TIMEOUT)
but I get an error saying "'tuple' object has no attribute 'items'"... how do I do this correctly?
Thank you!
Ron
I want to use http post to upload data to a webserver but I want to pass multiple arguments within the post i.e.
I know that you can load one item (data)in there like this:
data = {"data"pen(filename,"rb")}
response = opener.open(url, data, timeout=TIMEOUT)
but now I want multiple so I tried this:
multipart = ({"data":data}, {"fname":fname}, {"f":f})
response = opener.open(url, multipart, timeout=TIMEOUT)
but I get an error saying "'tuple' object has no attribute 'items'"... how do I do this correctly?
Thank you!
Ron