Created
October 19, 2016 13:05
-
-
Save TobyEalden/b21eea940a47b8910597e316c9565c59 to your computer and use it in GitHub Desktop.
This file contains 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
var filestream = fs.createReadStream(file); | |
filestream.pipe(res) | |
.on("finish", function() { | |
log("resource download complete"); | |
}) | |
.on("error", function(err) { | |
errLog("failure during resource download: %s", err.message); | |
}); | |
res | |
.on("finish", function() { | |
log("response resource download complete"); | |
}) | |
.on("error", function(err) { | |
errLog("response failure during resource download: %s", err.message); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment