FileTransfer upload causes error code 3 in ionic

I’m unable to upload a image to my server using Cordova’s file and file-transfer plugin through ionic. I need, and make a valid request to the server endpoint that’s expecting my image along with other data, but when I make the request, my payload is sent is as empty, which causes the server to respond with a 500 and ultimately an “error code 3” from the cordova plugin.

I’ve looked around and tried to figure this out, but seem to be stuck. Any help would be appreciated. I’ve tried this on Android

Here’s a snippet of my FileTransfer related code:

$scope.uploadFile = function() {
var params = {};
//var url = encodeURI(“”);
var url = encodeURI(“”);
//var url = “”;

    	    //target path may be local or url
    	    var targetPath = "";
            var filename = targetPath.split("/").pop();
            var option;
             option = new FileUploadOptions();
           options = {
       fileKey: "file",
       fileName: filename,
       chunkedMode: false,
       mimeType: "image/png",
       headers : {
            $cordovaFileTransfer.upload(url, targetPath, options).then(function(result) {
                console.log("SUCCESS: " + JSON.stringify(result.response));
            }, function(err) {
                console.log("ERROR: " + JSON.stringify(err));
            }, function (progress) {
                // constant progress updates
                $timeout(function () {
              		$scope.downloadProgress = (progress.loaded / * 100;