Improved drag & drop file path search

This commit is contained in:
2025-11-05 17:37:52 +01:00
parent 99c8bea0be
commit ea1f13f8c4
4 changed files with 29 additions and 24 deletions
+7 -4
View File
@@ -1,4 +1,7 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electronAPI', {
sendDropPath: (path) => ipcRenderer.send('file-dropped', path)
});
const { contextBridge, ipcRenderer, webUtils } = require('electron')
contextBridge.exposeInMainWorld("explorer", {
onFileDrop: (file) => webUtils.getPathForFile(file)
})