code 3 cordovaFileTransfer + ionic

From time to time I am getting this message. While the file you try to upload my server is also saved as registration. My code stops working and do not finish all that follows. I was reading (tell me if I'm wrong) that this message is how to overcome timeout. It happens only in iOS.

My options :

    var ftOptions = new FileUploadOptions();
    ftOptions.fileKey = 'file';
    ftOptions.fileName = $scope.imagen.substr($scope.imagen.lastIndexOf('/') + 1);
    ftOptions.mimeType = 'image/jpeg';
    ftOptions.httpMethod = 'POST';
    ftOptions.headers = { Connection : "close"};
    $cordovaFileTransfer.upload(encodeURI(server), $scope.imagen, ftOptions, trustAllHosts,true)

Log :

Object {code: 3, source: "file:///var/mobile/Containers/Data/Application/EA0…-C7B0-4BBA-A9D8-EDFE64EC682A/tmp/protonet_002.jpg", target: "http://test.com/-33.40844589093386/-70.57289114368912/1/2/2", http_status: null, body: null…}