"Files" property with javascript not working in Firefox, even though it's per Mozilla docs

Programming
Tutor: None Selected Time limit: 3 Days

I'm using this javascript code, per Mozilla docs, but it's not working in Mozilla, just in Chrome and Opera.

var data = new FormData(document.getElementById("uploadform"));		
var selected_file = document.getElementById('file').files[0];	
data.append('file-0', selected_file);
firefox also causes server error on the ajax file upload:
[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 have no idea why the "files" property does not seem to be working on Firefox. Here's the relevant Mozilla docs page: Using FormData Objects.


Nov 30th, -0001

Thank you for the opportunity to help you with your question!

In most cases, the discipline is self-governed by the entities which require the programming, and sometimes very strict environments are defined

Please let me know if you need any clarification. I'm always happy to answer your questions.
Jun 14th, 2015

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
Nov 30th, -0001
...
Nov 30th, -0001
Dec 7th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer