Uploading Cordova File to Node Server
I am using the fileTransfer ng-Cordova plugin to try and upload a photo from a user's camera roll to a Node / Express server.
I am getting the local URI of the photo and trying to pass it to the plugin as such:
$cordovaFileTransfer.upload('http://135.23.98.169:8069/upload_avatar', fileURI)
.then(function (result) {
console.log('success');
}, function (error) {
console.log('what');
});
Server endpoint reached, but req.files
undefined.
What am I doing wrong?
+3
source to share