File input (choose files to upload)
Opens the system file chooser; the page gets only the files the person picks.
In one line
Can open only the files you pick in the file chooser
Opens the system file chooser; the page gets only the files the person picks.
The most common way a site reaches a person's files. The person picks exactly what is shared, and the site sees name, size, type and modified time, but not the folder path.
What it can and can't do
What the user does: You tap Choose file, Upload or Attach, then pick.
It can
- Open the files you choose, one or several
- Upload them to its servers
- See their name, size and type
It cannot
- See other files or folders on your device
- Change or delete the originals
- Keep access after you close or reload the page
- See the full folder path
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 1 | 2004-11-09 | None |
| Safari | Supported | 1 | 2003-06-23 | None |
| Safari on iPhone | Supported | 1 | 2007-06-29 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | <input type=file multiple accept=...>; input.files; File, FileList |
| Browser compat keys | html.elements.input.type_fileapi.HTMLInputElement.filesapi.File |
| How access is granted | picker |
| What the user sees | System file chooser dialog (the person picks files) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | Yes |
| Activation | transient |
| How long it lasts | Per selection; File objects live until the page unloads |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Works in any frame; no permission policy |
Typical flow
- Person clicks the input or a label
- System picker opens
- Page receives FileList with File objects
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Can open the picker only from a click, tap or key press (input.showPicker also needs activation)
- The path is hidden: value shows C:\fakepath\name; no folder, no sibling files
- Cannot set files programmatically to a chosen path; only via DataTransfer from existing File objects
- Reads the file as it is at read time; later edits throw NotReadableError in Chrome and Safari if the file changed
- accept filter is a hint, not enforcement; no size limit from the browser (memory bound)
The story
What it is
Opens your system's file chooser, and the page gets only the files you pick.
For you
You tap 'Choose file', pick a photo or document in a system window, and the page gets only that one. It cannot see anything else on your device.
For makers
It is the safest, oldest way to get files. It works everywhere with no permission pop up, which is why upload forms are built on it.
Where you see it
| Type | Example | Apps |
|---|---|---|
| social | You pick a profile photo from your camera roll. | Facebook, Instagram |
| banking | You choose a PDF statement to upload to a loan application. | None named |
| education | You choose an essay file to submit to a class. | Canvas, Google Classroom |
| productivity | You choose a file to attach to a message. | Gmail |
| health | You pick a scan or lab result to share with a clinic. | None named |
| games | You pick a profile avatar or a custom skin for a browser game. | None named |
| shopping | You pick a photo to send for a return request. | None named |
Risks
- Shares a private file
- Check what you pick
What the platform says
- MDN: input type file. Documents the standard way a page asks a person to choose files to share.
Good uses and abuse
Legitimate uses
- Document and photo uploads
- Import data
- Profile pictures
Known abuse
- Tricking people into uploading private files
- Reading photo metadata (GPS EXIF) from uploads
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 1 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2022-03, Chrome 99: HTMLInputElement.showPicker() ships, so a script can open the chooser from its own gesture handler
Related capabilities
Related
- File metadata (name, size, type, modified time). Can see the name, size, type and last changed date of files you share
- File System Access: open and save pickers. Can open files you pick and save changes back to them, in Chrome and Edge
Sources
How well checked: Based on official documentation.