Skip to Content
Platform.Ontology

File input (choose files to upload)

Opens the system file chooser; the page gets only the files the person picks.

You pick what to shareFiles and storageFilesWeb browsersWhile you use it

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

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11None
EdgeSupported122015-07-29None
FirefoxSupported12004-11-09None
SafariSupported12003-06-23None
Safari on iPhoneSupported12007-06-29All iOS browsers use WebKit
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

API<input type=file multiple accept=...>; input.files; File, FileList
Browser compat keyshtml.elements.input.type_file
api.HTMLInputElement.files
api.File
How access is grantedpicker
What the user seesSystem file chooser dialog (the person picks files)
Needs a secure context (HTTPS)No
Needs a user gestureYes
Activationtransient
How long it lastsPer selection; File objects live until the page unloads
How to take it backNothing to revoke (no permission is stored)
Inside an iframeWorks in any frame; no permission policy

Typical flow

  1. Person clicks the input or a label
  2. System picker opens
  3. 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

TypeExampleApps
socialYou pick a profile photo from your camera roll.Facebook, Instagram
bankingYou choose a PDF statement to upload to a loan application.None named
educationYou choose an essay file to submit to a class.Canvas, Google Classroom
productivityYou choose a file to attach to a message.Gmail
healthYou pick a scan or lab result to share with a clinic.None named
gamesYou pick a profile avatar or a custom skin for a browser game.None named
shoppingYou pick a photo to send for a return request.None named

Risks

  • Shares a private file
  • Check what you pick

What the platform says

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

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction1 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2022-03, Chrome 99: HTMLInputElement.showPicker() ships, so a script can open the chooser from its own gesture handler

Sources

How well checked: Based on official documentation.

On this page