title: Formidable doesnt form.parse() when uploading a file in Nodejs
body: <p>When i send a file to /upload, from the terminal I can see that the code is blocked at form.parse(req... On the Internet I read that this is because I use bodyParser(), and people suggested to do this: </p>
  
  <pre><code>delete express.bodyParser.parse['multipart/form-data'];
  </code></pre>
  
  <p>however when I do that my code crashes since parse is null.</p>
  
  <p>Anyone has any idea on how to get file upload working only in /upload and possibly with formidable?</p>
  
  <p>Thanks.</p>
  
  <p>This is my <strong>app.js</strong>:</p>
  
  <pre><code>'use strict';
  
  var express = require("express");
  var async = require("async");
  var http = require('http');
  var url = require("url");
  var qs = require("querystring");
  var fs = require("fs");
  var formidable = require("formidable");
  var mime = require("mime");
  
  var app = module.exports = express();
  
  app.configure(function () {
    app.set("views", __dirname + "/views");
    app.set("view engine", "ejs");
    app.engine("html", ejs.renderFile);
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(express.cookieParser("abc"));
    app.use(express.static(__dirname + "/static"));
    app.use(app.router);
    app.use(express.limit('5mb'));
  });
  
  app.post('/upload', storage.upload);
  </code></pre>
  
  <p>This is my code <strong>storage.js</strong>:</p>
  
  <pre><code>'use strict';
  
  var async = require('async');
  var formidable = require('formidable');
  var fs = require('fs');
  var util = require('util');
  var api = require('./common');
  
  exports.upload = function (req, res) {
  
    console.log("I am here");
  
    var form = new formidable.IncomingForm(),
      files = [],
      fields = [];
  
    form.uploadDir = "./uploads";
  
    form
      .on('field', function (field, value) {
        console.log(field, value);
        fields.push([field, value]);
      })
      .on('error', function (err) {
        res.writeHead(200, {'content-type': 'text/plain'});
        res.end('error:\n\n'+util.inspect(err));
      })
      .on('file', function (field, file) {
        console.log(field, file);
        files.push([field, file]);
      })
      .on('aborted', function (err) {
        console.log("user aborted upload");
      })
      .on('end', function () {
        console.log('-&gt; upload done');
        res.writeHead(200, {'content-type': 'text/plain'});
        res.write('received fields:\n\n '+util.inspect(fields));
        res.write('\n\n');
        res.end('received files:\n\n '+util.inspect(files));
      });
    form.parse(req);
  };
  </code></pre>