By default application/json, application/x-www-form-urlencoded,
and multipart/form-data are supported, however you may map connect.bodyParser.parse[contentType]
to a function receiving (req, options, callback).
As a security measure files are stored in a separate object, stored
as req.files. This prevents attacks that may potentially alter
filenames, and depending on the application gain access to restricted files.
Multipart configuration
The options passed are provided to each parser function.
The multipart/form-data parser merges these with formidable's
IncomingForm object, allowing you to tweak the upload directory,
size limits, etc. For example you may wish to retain the file extension
## and change the upload directory
Parse request bodies.
By default application/json, application/x-www-form-urlencoded, and multipart/form-data are supported, however you may map
connect.bodyParser.parse[contentType]to a function receiving(req, options, callback).Examples
Multipart req.files:
As a security measure files are stored in a separate object, stored as
req.files. This prevents attacks that may potentially alter filenames, and depending on the application gain access to restricted files.Multipart configuration
The
optionspassed are provided to each parser function. The multipart/form-data parser merges these with formidable's IncomingForm object, allowing you to tweak the upload directory, size limits, etc. For example you may wish to retain the file extension ## and change the upload directoryView node-formidable for more information.
If you wish to use formidable directly within your app, and do not desire this behaviour for multipart requests simply remove the ## parser
Or