A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/FileReader/FileReader below:

FileReader: FileReader() constructor - Web APIs

FileReader: FileReader() constructor

Baseline Widely available

Note: This feature is available in Web Workers.

The FileReader() constructor creates a new FileReader.

For details about how to use FileReader, see Using files from web applications.

Syntax Parameters

None.

Examples

The following code snippet shows creation of a FileReader object using the FileReader() constructor and subsequent usage of the object:

function printFile(file) {
  const reader = new FileReader();
  reader.onload = (evt) => {
    console.log(evt.target.result);
  };
  reader.readAsText(file);
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4