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

label Programming
account_circle Unassigned
schedule 3 Days
account_balance_wallet $5

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

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Nov 30th, -0001
...
Nov 30th, -0001
Jun 26th, 2017
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