Cannot retrieve files after you add them to the formData object.
You will need to send the formData object somewhere, and then get the files from the req object or something like that.
In my case (angularJS + nodeJS) I checked this from the answer to SO (link below):
Angular:
var fd = new FormData();
fd.append('file', file);
$http({
method:"POST",
url:"uploadFile",
data: fd,
withCredentials: true,
headers: {'Content-Type': undefined },
transformRequest: angular.identity
});
Node (expressJS):
app.post('/uploadFile', function(req,res){
fs.readFile(req.files.file.path, function(err, data){
});
});
To find out what you can do with the file, read the following:
http://nodejs.org/api/fs.html
:
AngularJS: ?