HTTP POST multipart/form-data ... possible via AppleScript?

Hey there,

Been beating my head about this all day, and I’m just about out of creative ideas to work around this. Google seems to insist no-one has done it before, but I’m hoping someone here has some ideas I may not have tried. :slight_smile:

Basically, I’m trying to do an AppleScripted bulk HTTP upload. The standard way to do it is to do a HTTP POST using a Content-type of ‘multipart/form-data’. I figured I’d just be able to use IE’s ‘OpenURL’ and set the MIME Type to ‘multipart/form-data’ be good to go. I knew I’d have to build my own post data with the correct multipart layout, but that wasn’t too tough. Figured it’d ‘just work’ when I got that done.

It certainly doesn’t seem that way. As far as I can tell, IE’s OpenURL only lets me do a standard urlencoded string for HTTP POST, and not multipart. Ugh.

Does anyone know if this is possible? Has it been done?

Thanks!

Don

I should probably also mention that I probably need it to be via a web browser so I can see a nice web page with the results and all of that. I’m aware I could use “do shell script” and curl to actually get the files uploaded, but I need to go beyond that into the realm of gasp easy-to-use. :slight_smile:

Note that I said ‘probably’ in there… I’m willing to listen to all ideas, whether sane or crazy. :slight_smile:

Don

You actually could do the whole thing with curl - just save the page it gets back and display that to the user.