Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49299

Upload image from Camera/Gallery to server

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 49299


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>