Skip to content

Commit 5a90f55

Browse files
committed
add options.fileProcessCallback(fInfo, res, cb) for on file callback
1 parent cc1dc0a commit 5a90f55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/uploadhandler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ module.exports = function (options) {
7676
async.each(files, _.bind(function(fileInfo, cb) {
7777
this.initUrls(fileInfo, _.bind(function(err) {
7878
this.emit('end', fileInfo);
79+
if (_.isFunction(options.fileProcessCallback))
80+
options.fileProcessCallback(fileInfo, this.req, cb)
81+
else
7982
cb(err);
8083
}, this));
8184
}, this),

0 commit comments

Comments
 (0)