Code 3 FileTransfer cordova problem

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)


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

Same problem here. What was your solution?