element-desktop
element-desktop copied to clipboard
Use portals for file access on Linux
Your use case
What would you like to do?
Use XDG portals for file access, as GTK and Qt do
Why would you like to do it?
Provides a native interface and unbreaks the Flatpak package.
How would you like to achieve it?
Use the XDG portal API.
Have you considered any alternatives?
None
Additional context
Portals are the modern way to access files on desktop Linux. They are supported by all major desktop environments.
This happens entirely upstream of us. We just use https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file which Electron translates to the most appropriate mechanism for the given OS & DE.