angularjs - Cordova File Transfer to Node Server -


i'm using ng-cordova filetransfer plugin try upload photo user's camera roll node/express server.

i'm getting local uri of photo , trying pass plugin 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 reached, req.files undefined.

what doing wrong?

in express 4.x, have include multer middleware enable multipart data. after you've done that, file available in req.files


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -