For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface FileList

The FileList interface represents an object of this type returned by the files property of the HTML element; this lets you access the list of files selected with the element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage.

MDN Reference

interface FileList {
    length: number;
    "[iterator]"(): ArrayIterator<File>;
    item(index: number): File | null;
    [index: number]: File;
}

Indexable

  • [index: number]: File
Index
length: number

The length read-only property of the FileList interface returns the number of files in the FileList.

MDN Reference

  • The item() method of the FileList interface returns a File object representing the file at the specified index in the file list.

    MDN Reference

    Parameters

    • index: number

    Returns File | null

Was this helpful?