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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -