Skip to content

Instantly share code, notes, and snippets.

@geNAZt
Created January 25, 2013 20:23
Show Gist options
  • Save geNAZt/4637515 to your computer and use it in GitHub Desktop.
Save geNAZt/4637515 to your computer and use it in GitHub Desktop.
function sendFile(file, cb) {
var ds1 = mdm1.createStream({type: 'update', file: file});
var fsReadStream = fs.createReadStream(__dirname + "/" + file, {encoding: "binary"});
fsReadStream.pipe(ds1);
cb();
}
sendFile("test.png", function() {
sendFile("app.js", function() {
sendFile("app.exe", function() {
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment