@sajalsuraj wrote:
Hi,
I am following this tutorial for uploading image on server - https://devdactic.com/ionic-2-images/
After implementing, I am getting an error while copying file to local directory, this is the function -
copyFileToLocalDir(namePath, currentName, newFileName) {
this.file.copyFile(namePath, currentName, cordova.file.dataDirectory, newFileName).then(success => {
this.lastImage = newFileName;
this.presentToast(this.lastImage);
}, error => {
this.presentToast(‘Error while storing file.’);
});
}I am receiving toast message as “Error while storing file”. Please help me out to resolve this issue. Thanks.
Posts: 1
Participants: 1