I get this error when trying to upload a file. I am using the same camera services for two different uploads. I use a if statement to tell the two different uploads apart. I set the data.imageURI to localStorage. And use a function to call the FileTransfer upload. This is snippets of the code im using:
/Choose witch file is uploading/
if(localStorage.getItem("photoType")==1){
Code: Select all
localStorage.setItem("TEMP_profile_url",String(data.imageURI));
}
else if(localStorage.getItem("photoType")==0){
localStorage.setItem("TEMP_background_url",String(data.imageURI));
}
/SOME OTHER CODE/
/Function that will be doing the uploading/
function sendProfile(){
alert("Called Profile");
var ft = new FileTransfer();
ft.upload(localStorage.getItem("TEMP_profile_url"), uri, win, fail, options);
}
function sendBackground(){
alert("Called Background");
var ft2 = new FileTransfer();
ft2.upload(localStorage.getItem("TEMP_background_url"), uri, win2, fail, options);
}