Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
theogravity committed Mar 22, 2024
1 parent bf59114 commit b728af4
Show file tree
Hide file tree
Showing 5 changed files with 361 additions and 224 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.2.2 (2024-03-21)

- Internal refactors and small fixes

# 1.2.1 (2024-03-21)

- More immediate download fixes
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ ipcMain.handle('download-file', async (event, args) => {
downloadId = manager.download({
window: browserWindow,
url,
// If you want to download without a save as dialog
saveAsFilename: 'file.zip',
directory: '/directory/where/to/save',
// If you want to download with a save as dialog
saveDialogOptions: {
title: 'Save File',
},
callbacks: {
// item is an instance of Electron.DownloadItem
onDownloadStarted: async ({ id, item, resolvedFilename }) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electron-dl-manager",
"version": "1.2.1",
"version": "1.2.2",
"description": "A library for implementing file downloads in Electron with 'save as' dialog and id support.",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
Loading

0 comments on commit b728af4

Please sign in to comment.