---
title: "FileList | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# 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](https://developer.mozilla.org/docs/Web/API/FileList)

interface FileList {  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<File\>;  
    [item](#item-1)(index: number): File | null;  
    \[index: number\]: File;  
}

#### Indexable

-   \[index: number\]: File
    

##### Index

### Properties[](#properties)

[length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [item](#item)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<File\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<File\>
    

### item[](#item)

-   item(index: number): File | null[](#item-1)
    
    The **`item()`** method of the FileList interface returns a File object representing the file at the specified index in the file list.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/item)
    
    #### Parameters
    
    -   index: number
    
    #### Returns File | null
