Sending image from cordova plugin to server with form data

I am working on cordova application using MEAN(mongo, angular, express and node) Stack in which i am creating a users profile through mobile app and uploading image of user and image of id means 2 images using cordova-camera plugin. I want to send the user profile data and both images to server in one post and then the following 1. saving form data in users profile. then 2. saving image in a username folder and, then 3. saving scan image in same folder with some different name.

this is controller file with images part and user form data.

$scope.takePic = function () {
        navigator.camera.getPicture($scope.onSuccessPic, $scope.onFail, { quality: 50, allowEdit : true,
            destinationType: Camera.DestinationType.DATA_URL
        });
    }
    $scope.onSuccessPic = function (imageData) {
        var image = document.getElementById('myImage');
        image.src = "data:image/png;base64," + imageData;
        $scope.imageSrc = image.src;
    }
    $scope.onFail = function (message) {
        alert('Failed because: ' + message);
    }

    $scope.takeScan = function () {
        navigator.camera.getPicture($scope.onSuccessScan, $scope.onFail, { quality: 50, allowEdit : true,
            destinationType: Camera.DestinationType.DATA_URL
        });
    }
    $scope.onSuccessScan = function (imageData) {
        var image = document.getElementById('myScan');
        image.src = "data:image/png;base64," + imageData;
        $scope.scanSrc = image.src;
    }

$scope.submitUser = function(){


        var user= {
            name:$scope.myForm.name,
            userid:$scope.myForm.userid,
            sex:$scope.myForm.sex,
            age:$scope.myForm.age,
            fathername:$scope.myForm.fathername,
            mobile_no:$scope.myForm.mobile_no,
            email:$scope.myForm.email,
            language:$scope.myForm.language
        };

        console.log($scope.imageSrc);
        console.log($scope.scanSrc);
        dbServices.insertUser(user, $scope.imageSrc, $scope.scanSrc, function (response){
            if(response.data.success){
                alert('Successfully Registered');
            }
        })
    }

This is client service part

myapp.service('dbServices', ['$http', function($http){

this.insertUser = function(user, image, scan, callback){
    $http.post('http://localhost:3000/insertUser',{
        user:user,
        image:image,
        scan:scan
    }).then(function (response){
        callback(response)
    })
}
}])

This is the server controller file

exports.insertUser = function (req,res){  
    var user= new User(req.body.user),
        imageSrc = req.body.image,
        scanSrc = req.body.scan;
            user.save(function(err,user) {
                if (err) {
                    console.log(err);
                    return res.status(500).json({
                        error: 'Cannot create the user'
                    });
                }else{
                    if(imageSrc){
                        //INSERT IMAGE AND SCAN
                        exports.insertImage(req, res, user);
                    }else{
              res.json({success:true,user:user});                    
                    }
                }
            })
    });
}
exports.insertImage = function(req,res, user){
    var userid= user.userId,
        tempPath = req.body.image.path,
        extn_name = path.extname(req.files.file.name).toLowerCase(),
        targetPath = path.resolve(__dirname,'../../Project/myapp/Resources',users,userId);

    console.log('targetPath ', targetPath);

    mkdirp(targetPath, function(err){
        if (err) return res.send(500, 'can not upload profile picture');
        targetPath = path.resolve(targetPath, userid+ '.png');

        if (extn_name === '.png'){
            fs.rename(tempPath, targetPath, function(err) {
                if (err){
                    return res.status(500).json({error: 'Cannot upload image'});
                } 
                else{
                    if(req.body.scan){
                        //similarly inserting the image
                        exports.insertScan(req,res, user);
                    }else{
                        res.json({
                            success: true,
                            user:user
                        });
                    }
                }
            });
        } else {
            fs.unlink(tempPath, function() {
                if (err) console.error(err.name, err.message);
                console.error("Only png files are allowed!");
                res.json({
                    success: true,
                    message: "Only audio files are allowed!"
                });
            });
        }
    })
}

there is issue in sending base64 images and saving then. Can anybody tell me how to resolve this or any better way of doing this.