Adding error handler on upload stream

This commit is contained in:
Benjamin Boudreau 2015-02-27 14:06:49 -05:00
parent 4e4a8f44be
commit 55997f8a9f
1 changed files with 4 additions and 0 deletions

View File

@ -114,6 +114,10 @@ exports.upload = function (provider, req, res, options, cb) {
}
var writer = provider.upload(uploadParams);
writer.on('error', function(err) {
self._error(err);
});
var endFunc = function () {
self._flushing--;
var values = files[part.name];