File Handling (launchQueue)
Lets an installed web app open files of a given type from the file manager.
In one line
Can open files from your file manager in an installed web app, after you choose it
Lets an installed web app open files of a given type from the file manager.
Registers the PWA as handler for file types; the file arrives as a handle once the person opens it.
What it can and can't do
What the user does: You install the web app, then open a file with Open with and pick it
It can
- Appear in the Open with list for file types it supports
- Open the one file you picked and show it in the app
- Save changes back to that file after you confirm
It cannot
- Open files you did not choose
- Work for a site that is not installed
- Work in Firefox, Safari or on phones
- Skip the confirm step the first time you open a file
How it differs between platforms: Chrome and Edge on computers only. Phones, Firefox and Safari do not support it.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 102 | 2022-05-24 | None |
| Edge | Supported | 102 | 2022-05-31 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Not supported | Not available | Not listed | None |
| Samsung Internet | Not supported | Not available | Not listed | None |
How a site asks for it
| API | manifest file_handlers; window.launchQueue.setConsumer(launchParams => launchParams.files) |
| Browser compat keys | manifests.webapp.file_handlers |
| How access is granted | install |
| What the user sees | OS Open with list; first open confirm |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| How long it lasts | Per origin |
| How to take it back | Site settings |
| Inside an iframe | Same as top level; cross-origin iframes need a permissions policy where listed |
Typical flow
- Call the API
- Browser applies its access rules
- Page receives the result
Data you get
What comes back: Lets an installed web app open files of a given type from the file manager.
Shape: object
How often: on demand
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
launchParams.files | list | None | FileSystemFileHandle[] | Not listed |
Technical limits
- Installed PWA only
- Desktop only (Chrome, Edge)
- No file type registration on mobile
The story
What it is
An installed web app can be set to open certain file types when you double click them.
For you
You double click a picture or document and it opens in the web app, like a normal desktop program. On first use the browser may ask to confirm. You can change the default later.
For makers
Makers make web apps feel native: their app shows up in Open with and as the default. It deepens habit and loyalty. It works only for installed web apps in Chromium.
Where you see it
| Type | Example | Apps |
|---|---|---|
| creative | A web photo editor opens PNG files straight from your folder when you double click them. | None named |
| music | A web audio editor opens a sound file from the desktop. | None named |
| productivity | A web document app opens text and CSV files you double click. | Google Docs |
| developer | A web code editor opens source files from the file manager. | VS Code for the Web |
| games | A web emulator or level editor opens a save or map file with a double click. | None named |
| video | A web video tool opens clips you dragged from a camera folder. | None named |
| education | A web drawing app for classes opens a student's file from a shared drive. | None named |
Risks
- Hijacks file defaults
- Only installed apps
What the platform says
- Google Chrome: File Handling. Installed web apps can register as handlers for file types, so a double click opens the file in the app.
Good uses and abuse
Legitimate uses
- Editors and viewers
Known abuse
- None notable
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 3 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-04, Chrome 102: File Handling ships on desktop
Sources
How well checked: Checked against real behavior.