anyone have example of multipart/form for networkrequest?

Hi,

I was wondering if anyone had any examples of posting a form with multipart data to a remote server?

Some of the data might be binary attachments for example. I have managed to do this with smtp.message & smtp.send for email (bottom example here http://w3.impa.br/~diego/software/luasocket/old/luasocket-2.0-beta/smtp.html), but not sure about how it would be achieved with a general POST request

thanks
J

I'm after exactly the same thing. I wish to either take a photo and upload it via POST or select a photo from the iphone album and upload that in the same way. Has anyone done this yet?

thanks

Same here - I'd like to take a photo and be able to share it on facebook.

The sample code only lets you share a *link* to a picture - not actually upload a picture.

There is a mime module mime = require("mime") that I used the base64 encode/decoder from. I don't know what else it does.

But you should be able to do a standard post request just as if your submitting from a web browser.

For facebook, you need the oauth token ID and I am not sure how to get that out of the facebook api.

I'm very interested in doing this to Facebook, though.

views:1734 update:2011/9/27 18:14:54
corona forums © 2003-2011