Skip to main content
Commonmark migration
Source Link

Don't use bodyParser with Express 4.x: http://andrewkelley.me/post/do-not-use-bodyparser-with-express-js.html

use

app.use(express.json());

 

app.use(express.urlencoded());

instead. The problem with your code is that you will return before the callback will be called so the result will not be send to the user.

Change your code to:

return res.end(util.inspect({fields: fields, files: files}));

and remove the return at the end.

Don't use bodyParser with Express 4.x: http://andrewkelley.me/post/do-not-use-bodyparser-with-express-js.html

use

app.use(express.json());

 

app.use(express.urlencoded());

instead. The problem with your code is that you will return before the callback will be called so the result will not be send to the user.

Change your code to:

return res.end(util.inspect({fields: fields, files: files}));

and remove the return at the end.

Don't use bodyParser with Express 4.x: http://andrewkelley.me/post/do-not-use-bodyparser-with-express-js.html

use

app.use(express.json());

app.use(express.urlencoded());

instead. The problem with your code is that you will return before the callback will be called so the result will not be send to the user.

Change your code to:

return res.end(util.inspect({fields: fields, files: files}));

and remove the return at the end.

Source Link
Stofkn
  • 1.5k
  • 16
  • 24

Don't use bodyParser with Express 4.x: http://andrewkelley.me/post/do-not-use-bodyparser-with-express-js.html

use

app.use(express.json());

app.use(express.urlencoded());

instead. The problem with your code is that you will return before the callback will be called so the result will not be send to the user.

Change your code to:

return res.end(util.inspect({fields: fields, files: files}));

and remove the return at the end.