We make Construct 3, a large desktop PWA at editor.construct.net. It works great, especially when you do “Add to desktop” in Chrome - it looks and feels a lot like a native desktop app.
However one problem our users run in to is file extension association. Construct 3 saves user’s data to a .c3p file. Users are very familiar with double-clicking a file to open it, but double-clicking a .c3p file does nothing. This can leave them with the impression it’s broken. We support loading via drag-and-drop, but not everyone thinks of that.
As far as I’m aware, it’s simply impossible to set up this file association. We need a way to set up a file extension association to meet user expectation and reach parity with our old native desktop app.
It would be great if we could do something like
navigator.registerFileExtension(".c3p", "https://myapp.com/url/to/load/file"). Obviously this would need a permission prompt at a minimum. Then the browser would create the OS file extension association. Ideally we could specify an icon too.
Double-clicking a .c3p file could then go through a process like this:
- Launch the browser
- Navigate to the registered URL
- Provide the File object in a variable, e.g.
navigator.fileToOpen. The web app can look for this variable when it loads and open it automatically if it is found. This is much like the existing drag-and-drop API but simply making a file available on startup.
Now the user can double-click a .c3p file and have it open in our web app. Could a feature like this be specced?