V
vunet.us
Hi all,
I am converting my app to AJAX-based. I have a form that submits some
data including images. When I use AJAX XmlHttpRequest I am unable to
submit the form with ENCTYPE="multipart/form-data" (error 500).
Without ENCTYPE="multipart/form-data", everything goes well. I think
there is a header I must use in addition, but I cannot seem to find a
good solution. Can you suggest? Thank you.
Here is a part of xmlhttp request where I set header:
....
this.req.setRequestHeader("Content-Type", "application/x-www-form-
urlencoded; charset=UTF-8");
this.req.send(arguments[3]);
I am converting my app to AJAX-based. I have a form that submits some
data including images. When I use AJAX XmlHttpRequest I am unable to
submit the form with ENCTYPE="multipart/form-data" (error 500).
Without ENCTYPE="multipart/form-data", everything goes well. I think
there is a header I must use in addition, but I cannot seem to find a
good solution. Can you suggest? Thank you.
Here is a part of xmlhttp request where I set header:
....
this.req.setRequestHeader("Content-Type", "application/x-www-form-
urlencoded; charset=UTF-8");
this.req.send(arguments[3]);