Permalink
Browse files

misc

  • Loading branch information...
tj committed Nov 17, 2011
1 parent 32f4fc1 commit bda7be3d0d3ff7b33d6d2805128c14d69c39581f
Showing with 13 additions and 3 deletions.
  1. +11 −2 lib/middleware/bodyParser.js
  2. +2 −1 package.json
@@ -10,7 +10,8 @@
* Module dependencies.
*/
-var qs = require('qs');
+var qs = require('qs')
+ , formidable = require('formidable');
/**
* Extract the mime type from the given request's
@@ -76,7 +77,7 @@ exports = module.exports = function bodyParser(){
exports.parse = {};
/**
- * Parse x-www-form-urlencoded.
+ * Parse application/x-www-form-urlencoded.
*/
exports.parse['application/x-www-form-urlencoded'] = function(req, fn){
@@ -109,4 +110,12 @@ exports.parse['application/json'] = function(req, fn){
fn(err);
}
});
+};
+
+/**
+ * Parse multipart/form-data.
+ */
+
+exports.parse['multipart/form-data'] = function(req, fn){
+ var form = new formidable.IncomingForm;
};
View
@@ -8,7 +8,8 @@
"repository": "git://github.com/senchalabs/connect",
"dependencies": {
"qs": ">= 0.3.2",
- "mime": ">= 0.0.1"
+ "mime": ">= 0.0.1",
+ "formidable": "1.0.x"
},
"devDependencies": {
"koala": "0.1.2",

0 comments on commit bda7be3

Please sign in to comment.