navigator.camera.getPicture(
function(success){
// success = success.replace(“file://”,"");
console.log(“Got photo: " + success);
$(”#inPhotoSavePath").val(success);
$("#inPhotoSaveImg").attr(“src”, success);
$("#inPhotoSaveImg").show();
function(failure){
console.log("Photo failure: " + failure);
},
{ quality: 10,
saveToPhotoAlbum: true,
targetWidth: 100,
targetHeight: 100
}
)
}
After invoking the above getPicture function, it shows the following in console.log:
Got photo: file:///data/user/0/mobi.monaca.debugger/cache/1655003948696.jpg
Not allowed to load local resource: file:///data/user/0/mobi.monaca.debugger/cache/1655003948696.jpg
I also tried to remove “file://” from the “success” by uncommenting the first line in the success function. The “Not allowed to load local resource…” error disappears, but the image cannot display on screen.
Any ideas on how I can fix this or how should I access the image saved by the getPicture function?