Skip to content

Instantly share code, notes, and snippets.

@thomaschaaf
Created January 30, 2012 17:54
Show Gist options
  • Save thomaschaaf/1705670 to your computer and use it in GitHub Desktop.
Save thomaschaaf/1705670 to your computer and use it in GitHub Desktop.
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, formidable = require("formidable");
var config = require("./config");
var app = module.exports = express.createServer(function(req, res, next) {
if (req.url == '/api/soap/eyefilm/v1/upload') {
var form = new formidable.IncomingForm();
console.log("Upload startet");
form.on('progress', function(bytesReceived, bytesExpected) {
console.log("called");
var progress = {
type: 'progress',
bytesReceived: bytesReceived,
bytesExpected: bytesExpected
};
console.log(progress);
});
next();
}
else {
next();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment