Implemented functionality to have the UI be able to communicate with the backend

This commit is contained in:
2025-11-12 20:00:25 +01:00
parent 449255dda1
commit fbd5368223
3 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -5,7 +5,10 @@ const { contextBridge, ipcRenderer, webUtils } = require('electron')
try {
contextBridge.exposeInMainWorld("explorer", {
onFileDrop: (file) => webUtils.getPathForFile(file)
})
})
contextBridge.exposeInMainWorld("extractor", {
extract: (file) => ipcRenderer.send("extract", file)
})
} catch (error) {
console.log("Error in preload.js");
}