fix: file input element - missing path property (#3757)

This commit is contained in:
lohit
2025-01-08 17:01:57 +05:30
committed by GitHub
parent c5de2343e9
commit f5ff40abfa
3 changed files with 13 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
const { ipcRenderer, contextBridge } = require('electron');
const { ipcRenderer, contextBridge, webUtils } = require('electron');
contextBridge.exposeInMainWorld('ipcRenderer', {
invoke: (channel, ...args) => ipcRenderer.invoke(channel, ...args),
@@ -10,5 +10,9 @@ contextBridge.exposeInMainWorld('ipcRenderer', {
return () => {
ipcRenderer.removeListener(channel, subscription);
};
},
getFilePath (file) {
const path = webUtils.getPathForFile(file)
return path;
}
});