dropping files into the chat add the path

This commit is contained in:
Arjun 2026-01-31 00:15:12 +05:30
parent 7133dbe1d9
commit 2105f6d6cd
3 changed files with 40 additions and 2 deletions

View file

@ -1,4 +1,4 @@
import { contextBridge, ipcRenderer } from 'electron';
import { contextBridge, ipcRenderer, webUtils } from 'electron';
import { ipc as ipcShared } from '@x/shared';
type InvokeChannels = ipcShared.InvokeChannels;
@ -51,4 +51,8 @@ const ipc = {
},
};
contextBridge.exposeInMainWorld('ipc', ipc);
contextBridge.exposeInMainWorld('ipc', ipc);
contextBridge.exposeInMainWorld('electronUtils', {
getPathForFile: (file: File) => webUtils.getPathForFile(file),
});