After I trigger download
channel, I get the onProgress.progress
log before the Save as popup appears.
ipcMain.on('download', async (event: Electron.IpcMainInvokeEvent, downloadUrl: string) => {
const win = BrowserWindow.getFocusedWindow()!
try {
await download(win, downloadUrl, {
saveAs: true,
onProgress: (progress) => {
console.log('onProgress.progress: ', progress);
mainWindow.webContents.send('download-progress', progress)
},
onCompleted: (item) => {
mainWindow.webContents.send('download-completed', item)
}
})
} catch (error) {
if (error instanceof CancelError) {
console.info('item.cancel() was called')
} else {
console.error(error)
}
}
})
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too