element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

Use portals for file access on Linux

Open DemiMarie opened this issue 10 months ago • 1 comments

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.

DemiMarie avatar Mar 04 '25 23:03 DemiMarie

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.

t3chguy avatar Mar 05 '25 00:03 t3chguy