Connect middleware for formaline
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
support
.gitmodules
History.md
LICENSE
Readme.md
index.js
package.json

Readme.md

Connect Formaline

Connect Formaline is a multipart / urlencoded form parsing middleware utilizing node-formaline.

Installation

via npm:

$ npm install connect-formaline

Example

var form = require('connect-form');

connect(
  formaline({/* empty config object */}),
  function(req, res){
    if (req.method == 'POST'){
      var workWithFiles = function(json, res){
        /* work with uploaded files here */
      }
      
      req.form.on( 'loadend', function(json, res){
        workWithFiles(json, res);
        res.end(); // end response and work with files
      });
      
    }
  })
.listen(3000);