Skip to content

Instantly share code, notes, and snippets.

@ewgenius
Created August 19, 2015 06:19
Show Gist options
  • Save ewgenius/c25b93025103e24d7308 to your computer and use it in GitHub Desktop.
Save ewgenius/c25b93025103e24d7308 to your computer and use it in GitHub Desktop.
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