A file in the Javascript Browser Api (WebApi) is represented by a File object 1).
The file object is a blob object that adds support for files on the user's system.
When you use a HTML input of file type to select files, you get back a file object. See How to handle files in Javascript with the File API of the Browser?
Demo:
<input type="file" accept=".txt"/>
document.querySelector("input").addEventListener('change', async (event) => {
let file = event.target.files[0];
console.log(`File name: ${file.name}`);
let text = await (new Response(file)).text();
console.log(text);
});