File Handler Tester

Chrome 146 populates launchParams.targetURL when a PWA is launched to handle a file. Previously this field was undefined during file handling. Select a file (or use a preset) to simulate the full launch flow.

1. Select a File

Web App Manifest — file_handlers Entry

This manifest entry registers the PWA to handle the file types above. The targetURL is set to the launch URL of your PWA's origin, and launchParams.targetURL (new in v146) provides the actual file URL.

{ "name": "My File Handler PWA", "file_handlers": [ { "action": "/handle-file", "accept": { "text/plain": [".txt"], "application/json": [".json"], "text/csv": [".csv"], "text/markdown": [".md"] } } ] }

In v146, launchParams.targetURL gives you the file's URL (e.g. file:///home/user/data.json) so you can parse the filename, extension, and path without relying only on launchParams.files[0].name.