Add support for cancel (or pause?)
ericpyle opened this issue · 2 comments
ericpyle commented
See recent commit to sindresorhus/electron-dl@cb20484
Since your download manager tries to support resume, it's possible this cancel functionality could double as pause. (Truly canceling may require deleting the what has been downloaded upto the cancel.)
ndelvalle commented
@ericpyle apparently the item is being send as a second argument in the onProgress
function, so I think you should be able to call item.cancel()
, take a look:
electron-download-manager/index.js
Lines 47 to 49 in 2aec86d
danielnieto commented
Thanks @ndelvalle