Skip to content
RobeeeJay edited this page Aug 23, 2012 · 6 revisions

This module processes data that matches the content type "multipart/form-data" and places it into the request.body object.

It uses the node module Formidable for this purpose.

new fw.BodyComplex({ });

At present, it accepts no specific arguments.

Simple Example

var stackFull = new fw.Stack();

stackFull.append(new fw.BodyComplex());

After the above, the destination of a route can access submitted form data inside request.body, so if for instance a form was submitted with an INPUT field which has a NAME="password" and VALUE="same as my luggage", then request.body.password == "same as my luggage".

Any uploaded files will be placed inside an array under request.body.files, and also request.files.

Clone this wiki locally