Add provider upload response in final response

This commit is contained in:
Loic VELUT 2016-05-27 09:24:36 +02:00
parent 9e959270cb
commit f9d293e1fa
1 changed files with 5 additions and 2 deletions

View File

@ -132,8 +132,11 @@ exports.upload = function(provider, req, res, options, cb) {
self.emit('error', err); self.emit('error', err);
}); });
var endFunc = function() { var endFunc = function(providerFile) {
self._flushing--; self._flushing--;
file.providerResponse = providerFile;
var values = files[part.name]; var values = files[part.name];
if (values === undefined) { if (values === undefined) {
values = [file]; values = [file];
@ -146,7 +149,7 @@ exports.upload = function(provider, req, res, options, cb) {
}; };
writer.on('success', function(file) { writer.on('success', function(file) {
endFunc(); endFunc(file);
}); });
var fileSize = 0; var fileSize = 0;