HTMLInputElement: webkitEntries property - Web APIs | MDN

Value

An array of objects based on FileSystemEntry, each representing one file which is selected in the <input> element. More specifically, files are represented by FileSystemFileEntry objects, and, if they're allowed, directories are represented by FileSystemDirectoryEntry objects.

Examples

This example shows how to create a file selection <input> element and process the selected files.

HTML

html

<input id="files" type="file" multiple />

JavaScript

js

document.getElementById("files").addEventListener("change", (event) => {
  event.target.webkitEntries.forEach((entry) => {
    /* do stuff with the entry */
  });
});

Each time a change event occurs, this code iterates over the selected files, obtaining their FileSystemEntry-based objects and acting on them.

Specifications

Specification
File and Directory Entries API
# dom-htmlinputelement-webkitentries

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.