Search results
Jul 23, 2010 · The File interface provides information about files and allows JavaScript in a web page to access their content. File objects are generally retrieved from a FileList object returned as a result of a user selecting files using the <input> element, or from a drag and drop operation's DataTransfer object.
- FileReader
The FileReader interface lets web applications...
- Using Files From Web Applications
Here our loop handling the user-selected files looks at each...
- Type Property
Note: Based on the current implementation, browsers won't...
- lastModified
A number that represents the number of milliseconds since...
- lastModifiedDate
Though some browsers might still support it, it may have...
- Name Property
The name read-only property of the File interface returns...
- FileList
The FileList interface represents an object of this type...
- Working with Files
Your browser extension may need to work with files to...
- FileReader
Jul 26, 2024 · Your browser extension may need to work with files to deliver its full functionality. This article looks at the five mechanisms you have for handling files: Downloading files to the user's selected download folder. Opening files using a file picker on a web page. Opening files using drag and drop onto a web page.
- Concepts and Usage
- Interfaces
- Examples
- See also
The File API enables web applications to access files and their contents.
Web applications can access files when the user makes them available, either using a file element or via drag and drop.
Sets of files made available in this way are represented as FileList objects, which enable a web application to retrieve individual File objects. In turn File objects provide access to metadata such as the file's name, size, type, and last modified date.
File objects can be passed to FileReader objects to access the contents of the file. The FileReader interface is asynchronous, but a synchronous version, available only in web workers, is provided by the FileReaderSync interface.
Blob
Represents a "Binary Large Object", meaning a file-like object of immutable, raw data; a Blob can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data.
File
Provides information about a file and allows JavaScript in a web page to access its content.
FileList
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.
Reading a file
In this example, we provide a file element, and when the user selects a file, we read the contents of the first file selected as text, and display the result in a .
Feb 1, 2020 · MDN Web Docs (formerly known as the Mozilla Developer Network or MDN) is a free resource for in-depth documentation on web standards such as HTML5, CSS, JavaScript, and much more. MDN's mission is simple: provide developers with the information they need to easily build projects on the open Web.
MDN Web Docs, previously Mozilla Developer Network and formerly Mozilla Developer Center, is a documentation repository and learning resource for web developers. It was started by Mozilla in 2005 [1] as a unified place for documentation about open web standards, Mozilla's own projects, and developer guides. [2]
The File interface provides information about files and allows JavaScript in a web page to access their content. File objects are generally retrieved from a FileList object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's DataTransfer object, or from the mozGetAsFile() API on an ...
People also ask
What is MDN Web Docs?
Who maintains MDN Web Docs?
How does a browser extension work with files?
When did MDN Web Docs become a standard search engine?
Mar 27, 2017 · Using the File API, which was added to the DOM in HTML5, it's now possible for web content to ask the user to select local files and then read the contents of those files. This selection can be done by either using an HTML input element or by drag and drop.