Created
August 19, 2015 06:19
-
-
Save ewgenius/c25b93025103e24d7308 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 query = [] | |
/// ... | |
query.push(new Promise(function(resolve, reject) { | |
var fileKey = 'updates/' + version + '/' + moduleName + '/' + fileName.split('/')[1]; | |
var upload = s3Stream.upload({ | |
Bucket: 'qalqan', | |
Key: fileKey | |
}); | |
upload.on('part', function(details) {}); | |
upload.on('error', function(error) { | |
console.log(error); | |
reject(error); | |
}); | |
upload.on('finish', function() { | |
resolve(); | |
}); | |
entry.pipe(upload); | |
})); | |
Promise.all(query).then(function() { | |
/// end | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment