I use formidable for file uploads. You can either store them inside of a directory or you can use Amazon S3 to store them on their servers. It works like a charm.
Here is what some code looks like:
// At the top of your modules
var formidable = require('formidable');
var form = new formidable.IncomingForm(); //Receive form
form.parse(req, function(err, fields, files) { //Parse form and data
// Do form stuff, you can access the files
});
With jQuery, you can do the following:
$('#your_form').on('submit', function(e) {
var formData = new FormData($(this)[0]);
$.ajax({
url : '/your/url/',
type: 'POST',
contentType: 'multipart/form-data',
data: formData,
success: function (msg) {
console.log(msg);
},
processData: false
});
e.preventDefault();
});