Sha256: 79b06c491b5caa770fa7ba8300a05e01474f008a576d7ab129fa81c6e87732ac
Contents?: true
Size: 1008 Bytes
Versions: 26
Compression:
Stored size: 1008 Bytes
Contents
# Connect Form Connect Form is a multipart / urlencoded form parsing middleware utilizing [node-formidable](http://github.com/felixge/node-formidable) behind the scenes. ## Installation via npm: $ npm install connect-form ## Example var form = require('connect-form'); var server = connect.createServer( form({ keepExtensions: true }), function(req, res, next){ // Form was submitted if (req.form) { // Do something when parsing is finished // and respond, or respond immediately // and work with the files. req.form.complete(function(err, fields, files){ res.writeHead(200, {}); if (err) res.write(JSON.stringify(err.message)); res.write(JSON.stringify(fields)); res.write(JSON.stringify(files)); res.end(); }); // Regular request, pass to next middleware } else { next(); } } );
Version data entries
26 entries across 26 versions & 1 rubygems