Skip to content

Commit e61a967

Browse files
committed
Merge pull request #21 from thrownblown/master
chore: nodejs sample update
2 parents 0525b25 + e2ebe2c commit e61a967

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

samples/Node.js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This sample is written for [Node.js 0.6+](http://nodejs.org/) and requires [Expr
55
To install and run:
66

77
cd samples/Node.js
8-
npm install express@3.*
8+
npm install express
99
node app.js
1010

1111
Then browse to [localhost:3000](http://localhost:3000).

samples/Node.js/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
var express = require('express');
2+
var multipart = require('connect-multiparty');
3+
var multipartMiddleware = multipart();
24
var flow = require('./flow-node.js')('tmp/');
35
var app = express();
46

@@ -9,7 +11,7 @@ app.use(express.static(__dirname + '/../../src'));
911
app.use(express.bodyParser());
1012

1113
// Handle uploads through Flow.js
12-
app.post('/upload', function(req, res){
14+
app.post('/upload', multipartMiddleware, function(req, res){
1315
flow.post(req, function(status, filename, original_filename, identifier){
1416
console.log('POST', status, original_filename, identifier);
1517
res.send(200, {

0 commit comments

Comments
 (0)