Hi all,
I'm trying to create a gadget that can post a file and then parse the
result (in JSON).
I've got to the point where I've written a <form /> with a <input
type="file" /> in it. It calls my JS function on submit. The remote
REST API expects a multipart/form-data.
I've tried this:
var params = {};
postdata="";
postdata = gadgets.io.encodeValues(postdata);
params[gadgets.io.RequestParameters.METHOD] =
gadgets.io.MethodType.POST;
params[gadgets.io.RequestParameters.HEADERS] = {'Content-Type' :
'multipart/form-data'};
params[gadgets.io.RequestParameters.POST_DATA]= postdata;
gadgets.io.makeRequest(url, handleAck, params);
and the remote API returns the error : "the request was rejected
because no multipart boundary was found".
How should i put the form's file content in the POST data ?
--
You received this message because you are subscribed to the Google Groups
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/Google-Gadgets-API?hl=en.