Support for File Drop #1045

Open
opened 2026-01-29 16:56:32 +00:00 by claunia · 0 comments
Owner

Originally created by @AeonSake on GitHub (Dec 26, 2025).

The drag/drop events don't natively expose the file path on file drop. For that, you have to invoke the getPathForFile function provided by the webUtils module. Unfortunately, this is not exposed by default (even less so when context isolation is turned on). Is there a way to invoke that function with the current possibilities, ideally without adding a preload script? And if it's not possible, is there a way to use a preload script without having it exposed as a physical file (e.g., loading from manifest stream)?

Originally created by @AeonSake on GitHub (Dec 26, 2025). The drag/drop events don't natively expose the file path on file drop. For that, you have to invoke the [`getPathForFile`](https://www.electronjs.org/docs/latest/api/web-utils#webutilsgetpathforfilefile) function provided by the `webUtils` module. Unfortunately, this is not exposed by default (even less so when context isolation is turned on). Is there a way to invoke that function with the current possibilities, ideally without adding a preload script? And if it's not possible, is there a way to use a preload script without having it exposed as a physical file (e.g., loading from manifest stream)?
claunia added the Feature label 2026-01-29 16:56:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1045