Skip to content

FileList

Values

item

Returns the File at the specified index.

FileList is not an array, so you need to iterate manually using length and item:

let files = []
for i in 0 to fileList.length - 1 {
  files->Array.push(fileList->FileList.item(i))
}

Read more on MDN

let item: (WebAPI.DOMAPI.fileList, int) => WebAPI.FileAPI.file

Parameters

WebAPI.DOMAPI.fileList int

Return type

WebAPI.FileAPI.file