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('', fileURI)
                    .then(function (result) {
                    }, function (error) {


Server endpoint reached, but req.files


What am I doing wrong?


source to share

1 answer

In Express 4.x, you must enable the multer middleware to enable multipart data. After you do this, the file will be available inreq.files



All Articles