Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to upload a file using AJAX. Unfortunately, the XMLHttpRequest.send in Safari sends the file without adding multipart form boundaries (http://lists.macosforge.org/pipermail/webkit-unassigned/2009-July/119008.html). As a result, CGI.pm dies with the following error:
"Malformed multipart POST: data truncated"
How can I get around this? It seems like the best way is to modify my JavaScript so that it sends correct form boundaries; unfortunately, I'm not sure that that is possible in this case. How can I change CGI.pm to accept a "multipart" form POST that only includes data for a file without the boundary string?
Thanks in advance,
--TWH
Comment on AJAX file upload and "malformed multipart POST: data truncated"