A FileList is an array-like object that represents a collection of File objects returned by the files property of the HTML <input> element. You can use this to access the list of files selected with the <input type="file"> element.

Just like a JavaScript array, FileList has the length property that returns the number of files in the list. However, it is not an actual array. So you can not use common array's methods like slice(), map(), filter(), or forEach() on a FileList object.


Iterate Over FileList in JavaScript
4.35 GEEK