Skip to Content
Platform.Ontology

Bulk photo library and file system

A site cannot browse your photo library or disk by itself.

Blocked for appsHardware and accessoriesNot exposedWeb browsersWhile you use it

In one line

Can't browse your whole photo library or your files on its own

A site cannot browse your photo library or disk by itself.

Only files the person picks (or a folder they grant) are visible. No silent photo, music or Downloads scan.

What it can and can't do

What the user does: You tap Upload and pick files or a folder yourself each time.

It can

  • Open the files you pick in a file chooser
  • Open a folder you pick, in browsers that allow it
  • Remember a folder you pick for later in some browsers, if you grant it again

It cannot

  • See your photo library or your files without you picking them
  • Browse folders or look at file names you did not choose
  • Keep access after you close the page in most cases
  • Pick files on your behalf without the file chooser

Browser support

BrowserStatusFirst versionNote
ChromeNot supportedNot availableOnly via pickers
EdgeNot supportedNot availableOnly via pickers
FirefoxNot supportedNot availableOnly via pickers
SafariNot supportedNot availableOnly via pickers
Safari on iPhoneNot supportedNot availableOnly via pickers
Chrome on AndroidNot supportedNot availableOnly via pickers
Samsung InternetNot supportedNot availableOnly via pickers

How a site asks for it

API<input type=file>, showOpenFilePicker(), showDirectoryPicker()
Browser compat keysapi.Window.showOpenFilePicker
How access is grantednot-exposed
What the user seesFile chooser or folder grant required each time
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsPer origin
How to take it backSite settings
Inside an iframeSame as top level; cross-origin iframes need a permissions policy where listed

Typical flow

  1. Call the API
  2. Browser applies its access rules
  3. Page receives the result

Data you get

What comes back: A site cannot browse your photo library or disk by itself.
Shape: object
How often: on demand

FieldTypeUnitRangePrecision
picked Fileobjectbytesuser selected onlyNot listed
directory handleobjectNoneone folder tree after AllowNot listed

Technical limits

  • No enumeration of photos, contacts, messages or system folders
  • Folder grants exclude system folders such as Downloads root and home
  • iOS gives only the picker's selected photos

The story

What it is

A site cannot browse your photos or files by itself.

For you

You choose which photo or file to upload. The site sees only what you pick, nothing else on your device.

For makers

Apps wanted to scan whole photo libraries to find faces or sort things and to build profiles. Instead they use a file picker that shows one thing at a time, or ask for one folder.

Where you see it

TypeExampleApps
socialA photo app wants to scan all your pictures for faces. Instead you pick one image to post.Instagram web
shoppingA resale site wants to see your gallery. Instead you pick up to ten photos of an item.Depop, Etsy
productivityA cloud drive wants your whole folder. It asks you to choose one folder to sync.Google Drive, Dropbox
creativeAn editor wants your whole library, but you open each project file by hand.Photopea
securityMalware wants to scan your documents. The browser will not let a page read files you did not pick.None named
kidsA school portal asks a child to pick one picture, never the whole camera roll.None named

Risks

  • Social engineering
  • Picking the wrong file

Good uses and abuse

Legitimate uses

  • Upload flows

Known abuse

  • Social engineering to pick sensitive files

Scores

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

History

  • 2020, Chrome 86: File System Access API (desktop Chrome)

Sources

How well checked: Based on official documentation.

On this page