I stepped through the CDVFileTransfer.m class to see where it breaks, and it happens at the point where the Image File data is created, i.e. I would assume that the path is not valid? I’ve tried multiple ways to access the full path of the file, but perhaps I’m not accessing that correctly?
This is what my latest attempt looks like with regards to getting the ‘correct’ image uri:
window.resolveLocalFileSystemURL(fileUri, function(fileEntry){
var name = fileEntry.fullPath.substr(fileEntry.fullPath.lastIndexOf('/') + 1);
window.resolveLocalFileSystemURL(cordova.file.dataDirectory, function(fs) {
fileEntry.copyTo(
fs,
name,
function(entry){
var fullUrl = cordova.file.dataDirectory + entry.nativeURL.substr(entry.nativeURL.lastIndexOf('/') + 1);
$scope.picData = fullUrl;
},
onFail
);
},
onFail);
}, onFail);