urlencoded / multipart form parsing middleware for Connect
JavaScript
Pull request Compare This branch is 11 commits ahead of sdepold:master.
Latest commit b09c025 May 7, 2012 Anatoliy Chakkaev Merge pull request #1 from prop/master
Invalid reference to the main file
Permalink
Failed to load latest commit information.
lib
support Added connect submodule for testing Jul 20, 2010
test
.gitmodules Added connect submodule for testing Jul 20, 2010
History.md Release 0.2.1 Mar 25, 2011
LICENSE Added LICENSE file Feb 21, 2011
Makefile Added connect submodule for testing Jul 20, 2010
Readme.md Describe usage in readme Jan 22, 2012
index.html Release 0.1.0 Jul 14, 2010
package.json Fixed reference to the main file May 7, 2012

Readme.md

Connect Form

Connect Form is a multipart / urlencoded form parsing middleware utilizing node-formidable behind the scenes.

Installation

via npm:

$ npm install connect-form-sync

Example

checkout https://github.com/anatoliychakkaev/railway-example-upload

files_controller.js:

action('create', function () {
    this.file = new File();
    var tmpFile = req.form.files.file;
    this.file.upload(tmpFile.name, tmpFile.path, function (err) {
        if (err) {
            console.log(err);
            this.title = 'New file';
            flash('error', 'File can not be created');
            render('new');
        } else {
            flash('info', 'File created');
            redirect(path_to.files);
        }
    }.bind(this));
});