visionmedia/connect-form — Issue #27: connect-form stopped working after upgrading express to the latest
Author: anthonywebb
Created: 2011-12-07 16:08:40+00:00
State: open

I had connect form working fine until I did an npm upgrade, unsure where to start on the debugging side:

//******************************
// BUILD THE HTTP SERVER
//******************************
var http = require('http');
var request = require('request');
var express = require('express');
var formy = require('connect-form');

var app = express.createServer(formy({ keepExtensions: true, uploadDir:'./uploads' }));

Then in my app the first thing I do is call "processForm"

function processForm(req,res, next) {
console.log("processing form");
req.form.complete(function(err, fields, files) {
if (err) {
console.log("error processing form: "+err.message);
var JSONresp = {status:"error",message:"Error processing form"};
res.send(JSONresp,500);
}
else {
console.log(fields);
console.log('---------------');
console.log(files);
req.fields = fields;
req.files = files;
next();
}
});
}

The route looks like:

app.all('/echo', processForm, function(req, res){
var JSONresp = {status:"ok",params:req.params,body:req.body,query:req.query};
res.send(JSONresp);
});

When I run the above I get "processing form" to the console, but then it simply hangs until it finally times out. Can someone help me to know where to start debugging?