files/en-us/web/api/file/index.md
{{APIRef("File API")}}{{AvailableInWorkers}}
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 {{DOMxRef("FileList")}} object returned as a result of a user selecting files using the {{HTMLElement("input")}} element, or from a drag and drop operation's {{DOMxRef("DataTransfer")}} object.
A File object is a specific kind of {{DOMxRef("Blob")}}, and can be used in any context that a Blob can. In particular, the following APIs accept both Blobs and File objects:
body option to {{domxref("Window/fetch", "fetch()")}}See Using files from web applications for more information and examples.
{{InheritanceDiagram}}
File.The File interface also inherits properties from the {{DOMxRef("Blob")}} interface.
File object.File object.File is relative to.The File interface also inherits methods from the {{DOMxRef("Blob")}} interface.
{{Specifications}}
{{Compat}}