June 6th, 2013, 01:03 AM
formdata files array not working in firefox, but works in chrome and opera
firefox also causes server error on the ajax file upload:
var data = new FormData(document.getElementById("uploadform"));
var selected_file = document.getElementById('file').files;
I have no idea why "files" does not seem to be working. I've posted on Mozilla support forum with no answers, and on stack overflow with one attempted answer. Here's the relevant Mozilla docs page: Using FormData Objects.
[Wed Jun 05 21:34:53 2013] [error] [client ::1] PHP Notice: Undefined index: file-0 in /home/jeff/public/website.com/public/upload.php on line 11, referer: http://localhost/
I've tested firefox 21, 24 nightly, and 10 on a linux machine, and tested firefox 21 on a windows machine, all with the same results.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!