Last active
April 3, 2017 23:29
-
-
Save esayler/bc00a91b618bf3c7c519af962463153b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let stream = progress({ time: 50 }) | |
stream.on('progress', progress => { | |
mainWindow.setProgressBar(progress.percentage / 100.0) | |
}) | |
request | |
.get(url) | |
.pipe(stream) | |
.pipe(fs.createWriteStream(path)) | |
.on('close', finished) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment