captainbrosset / file-handling-demo

A demo app showing all of the ways files can be opened or saved on the web
https://cranky-shaw-fe95e8.netlify.app/
12 stars 3 forks source link

Web File Handling Demo

The purpose of this demo app is to show the different ways in which files can be handled on the web.

Read my blog post for more information about this.

The app supports the following features:

Building locally

Browser support

🖥 = limited to desktop platforms
📦 = requires installation
🚧 = experimentally supported
✅/⛔️ without label = applies to all platforms (iOS only counts for Safari)

Chrome Edge Safari Firefox
<input type=file>
🖥 Drag and drop file
Paste file ✅ Windows
✅ macOS
⛔️ Android*
✅ Windows
✅ macOS
⛔️ Android*
⛔️ (bug)
📦 Web Share Target ⛔️ Windows†
⛔️ macOS
✅ Android†
✅ Windows†
⛔️ macOS
⛔️ Android†
⛔️ ⛔️
📦 File Handling (?) 🚧 Windows
⛔️ macOS
⛔️ Android
❓ Windows
⛔️ macOS
⛔️ Android
⛔️ ⛔️
File System Access ✅ Windows
✅ macOS
⛔️ Android
✅ Windows
✅ macOS
⛔️ Android
§ ⛔️
<a download>
Share file
(navigator.share)
✅ Windows
⛔️ macOS (bug)
✅ Android
⛔️ (bug)

*On Android, it is not possible to paste files to the web because the clipboard can’t contain files.
†On Windows, only PWAs installed through Edge appear in the system’s share dialog. On Android, only PWAs installed through Chrome appear in the system’s share dialog.
‡File Handling is experimentally supported in Edge on Windows, but when choosing to open a text file in the demo app (“Open with…”), the app opens in its default state without the file’s contents; see #5.
§File System Access is experimentally supported in Safari, but it doesn’t (yet) work in the demo app.