in reply to Re: CGI upload from ajax
in thread CGI upload from ajax

Thank you all for the fast replies!

I added this line:
contentType: "multipart/form-data",
to the ajax part but still not working...I am getting the following error
Malformed multipart POST: data truncated
I will search for other options but I am still surprised why it shouldn't work.

Replies are listed 'Best First'.
Re^3: CGI upload from ajax
by derby (Abbot) on Feb 04, 2009 at 16:41 UTC

    Right ... use a plugin ... you have to construct the html in such a way that the browser will do the right thing. Most of the plugins will wrap your html with the proper html snippets.

    -derby

      I couldn't make them work. I try a few and none of them work. All the examples are based on php in the server side. So, when I change the php for my cgi I am getting the same errors or even none.....:-( I don't know

      thanks

        In these situations, it's best to first code a simple form as static html, then do a plain vanilla CGI upload script ... and then once that's working, transition to Ajax. At this point, it's not an Ajax issue but correctly coding the cgi for the file upload.

        -derby