aguidrevitch/jquery-file-upload-middleware — pull request #31 by gsarwohadi (2013-10-12 04:40:47+00:00)
Title: Trying to fix passing formData from form to middleware

I needed to use 'formData' sent from the client and since the middleware isn't collecting it properly, I tried to make a fix.

This what I did:
Collect formData on 'field' formidable event in UploadHandler.prototype.post method to a req.fields object (created new object if undefined). Extend fileInfo with req.fields on 'end' event. So on upload.on("end", function (fileInfo)), I can have the extra property from formData in fileInfo.

Example use:

In the client:
```html

```

In the server:
```javascript
upload.on("end", function (fileInfo)
{
var filemanager = upload.fileManager({
targetDir: __dirname + "/public/userfiles/" + fileInfo.user_id,
targetUrl: "/userfiles/" + fileInfo.user_id
});
filemanager.move(fileInfo.name, "", function (err, result)
{
console.dir(result);
})
});
```