Reputation: 3614
I'm using the ng-Cordova fileTransfer plugin to try to upload a photo from the user's camera roll to a Node/Express server.
I'm getting the local URI of a 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');
});
The server endpoint is reached, but req.files
is undefined.
What am I doing wrong?
Upvotes: 3
Views: 1174