Folks,

I'm going through tutorials about uploading file through Ajax. This one, this one, and another one. They are very similar. Both stuff the data into an object and post it with $.ajax(...) . So far so good.

There is a line
Code:
m_data.append( 'file_attach', $('input[name=file_attach]')[0].files[0]);
What is the first [0] for? Why is it required? Where can I read more about the files[] array?

Any suggestion, insight or reference is really appreciated!

Best,
-Nick