Created
February 20, 2015 04:09
-
-
Save wbashir/a6a749d8abc29f3bec8e to your computer and use it in GitHub Desktop.
Fiber Parent Callback
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
uploadS3: function (file, callback, callbackArgs) { | |
var s3 = new AWS.S3(); | |
var options = { | |
partSize: 10 * 1024 * 1024, | |
queueSize: 1 | |
}; | |
s3.upload(file, options, function (error, data) { | |
if (callback) { | |
Meteor.wrapAsync(Meteor.call(callback, callbackArgs, {error: error, data: data})); //Barfs | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this: