ionic - How to upload an image with cordovaFileTransfer to my Spring service? -
i using ionic in project , need take picture phone , upload picture server , save it.
i using next function upload image think sending image path , not image file
$scope.upload = function() { var options = { filekey: "avatar", filename: "image.png", chunkedmode: false, mimetype: "image/png" }; $cordovafiletransfer.upload("http://192.168.56.1:1337/file/upload", "/android_asset/www/img/ionic.png", options).then(function(result) { console.log("success: " + json.stringify(result.response)); }, function(err) { console.log("error: " + json.stringify(err)); }, function (progress) { // constant progress updates }); }
i have string on server. how can receive image file on spring service???
Comments
Post a Comment