We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e2d68d + 3f7e2cc commit d15efc7Copy full SHA for d15efc7
lib/uploadhandler.js
@@ -62,6 +62,7 @@ module.exports = function (options) {
62
if (!--counter) {
63
_.each(files, function (fileInfo) {
64
this.initUrls(fileInfo);
65
+ fileInfo = _.extend(fileInfo, self.req.fields);
66
this.emit('end', fileInfo);
67
}, this);
68
this.callback({files: files}, redirect);
@@ -84,6 +85,9 @@ module.exports = function (options) {
84
85
if (name === 'redirect') {
86
redirect = value;
87
}
88
+ if ( !self.req.fields )
89
+ self.req.fields = {};
90
+ self.req.fields[name] = value;
91
})
92
.on('file', function (name, file) {
93
var fileInfo = map[path.basename(file.path)];
0 commit comments