Skip to content

Commit

Permalink
Merge branch 'CezarLuiz0-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
hacksparrow committed Jul 13, 2014
2 parents 3d38572 + 9b6394c commit ae4a46f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var path = require('path');
var crypto = require('crypto');
var Busboy = require('busboy');
var mkdirp = require('mkdirp');
var qs = require('qs');

module.exports = function(options) {

Expand Down Expand Up @@ -139,6 +140,10 @@ module.exports = function(options) {
req.files[field] = req.files[field][0];
}
}

// Parse the body and create a best structure
req.body = qs.parse(req.body);

// when done parsing the form, pass the control to the next middleware in stack
if (options.onParseEnd) { options.onParseEnd(); }
next();
Expand Down

0 comments on commit ae4a46f

Please sign in to comment.