I'm trying to send an image from an ionic app to an external API via server code, using the camera_getPicture plugin, but the image data is blank.
This is the mapping from the plugin to the var:
This is the code I am using, but the $scope.im is null?
pre
var requestData = {};
/CLICK TO EDIT MAPPING/
// read more about using rest services: https://links.appery.io/ve-snippet-rest
Apperyio.get("Camera_getPicture")(requestData).then(
function(success){ // success callback
(function mapping8582(success, $scope){
var im_scope = $scope.im;
im_scope = success.image;
$scope.im = im_scope;
/CLICK TO EDIT MAPPING/
Code: Select all
$.ajax({
type: "POST",
url: 'https://dashboard.cmg-org.com/jobs/add_image_post',
data: "image="+ $scope.im,
success: function(data){
}
});
})(success, $scope);
},
function(error){ // callback to handle request error
},
function(notify){ // notify callback, can fire few times
});
/pre
I'm receiving the request on the server fine, but the image data is empty.
What am i doing wrong?