How to make uploading files or images using ionicframwork or angularJS

I am working on this problem as well.

I have the following controller:

.controller('CameraCtrl', function ($scope) {    

 $scope.takePic = function() {
    var options =   {
        quality: 50,
        destinationType: Camera.DestinationType.DATA_URL,
        sourceType: 1,      // 0:Photo Library, 1=Camera, 2=Saved Photo Album
        encodingType: 0     // 0=JPG 1=PNG
    }
    // Take picture using device camera and retrieve image as base64-encoded string
    navigator.camera.getPicture(onSuccess,onFail,options);
}
var onSuccess = function(imageData) {
    console.log("On Success! ");
    $scope.picData = "data:image/jpeg;base64," +imageData;
    $scope.$apply();
};

$scope.send = function() {            
var myImg = $scope.picData;
var options = new FileUploadOptions();
        options.fileKey="pics";
        options.chunkedMode = false;

        var params = {};
        params.user_token = localStorage.getItem('auth_token');
        params.user_email = localStorage.getItem('email');
        options.params = params;

    var ft = new FileTransfer();
    ft.upload(myImg.src, encodeURI("https://xxx.herokuapp.com/ics/"), onUploadSuccess, onUploadFail, options);
    
}

Taking pictures is working, but I cannot upload it. What am I doing wrong? I am thankful for any kind of hint.