POST to PHP with enctype='multipart/form-data?

AJAX can't do multipart/form-data encoded requests, only application/x-www-form-urlencoded.

AJAX can't do multipart/form-data encoded requests, only application/x-www-form-urlencoded. This is a limitation of the XmlHttpRequest API. The only workaround is to use an iframe, the technique for which is just a google search away.

Well the file upload works through the AJAX submission, so I'm not sure that is the case. – Josh Sep 10 '10 at 18:00 you can use javascript to activate the upload but you cant use ajax to actually send the file. – RobertPitt Sep 10 '10 at 18:08 Yes Robert is correct, it just activates the submission =) – Josh Sep 10 '10 at 18:13.

I'm light on AJAX, but if values are being passed you can get them from $HTTP_RAW_POST_DATA. I believe $_POST only gets filled with encrypt = "application/x-www-form-urlencoded" php.net/manual/en/reserved.variables.htt....

I think your wrong with that, enctype just tells the server what encoding the data is being sent as, should have no effect on how php places the data in the globals. – RobertPitt Sep 10 '10 at 18:07 I echo'ed $HTTP_RAW_POST_DATA back through the AJAX reply, and it was empty =( – Josh Sep 10 '10 at 18:20.

Alternatively to using iframes, you can use a Flash-based uploader such as FancyUpload that integrates nicely with AJAX applications and can even show a progress bar.

I'd rather not use Flash, as I am trying to integrate this into forum user accounts, which is why I need to pass the extra POST variables. Thanks though =) – Josh Sep 10 '10 at 18:14.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions