Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

urlencoded / multipart form parsing middleware for Connect

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 support
Octocat-spinner-32 test
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 History.md
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 Readme.md
Octocat-spinner-32 index.html
Octocat-spinner-32 package.json
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));
});
Something went wrong with that request. Please try again.