Show system "open with" dialog when clicking file from electron application

752 views Asked by At

In my Electron application I store links to local file paths. Now I would like the user to be able of opening such links using whatever application the operating system is configured for (or the usual "open with" dialog).

Is this possible?

Thanks

1

There are 1 answers

0
mdt On

Found a list of possible solutions here:

https://stackoverflow.com/a/33425619/2110299

Of these, the most relevant seems to me the shell module plugin:

https://electron.atom.io/docs/api/shell/

Which provides following API:

shell.openItem(fullPath)

Open the given file in the desktop’s default manner.

Returns Boolean - Whether the item was successfully opened.