i can hit my api through ionic cordova run browser , but when i try to debug and build it to mobile device , the api wasnt get hitted by my app… any one can help ?
heres my source code:
this.camera.getPicture(options).then((imageData) => {
let base64Image = ‘data:image/jpeg;base64,’ + imageData;
this.userPhoto = base64Image;
let loader = this.loadCtrl.create({
content: “Uploading…”,
});
loader.present();
let data = {
userId: this.userData.userId,
userPhoto: base64Image
}
console.log(data,‘untuk di upload’)
this.userService.changePicture(data).subscribe(res => {
loader.dismiss();
})
}, (err) => {
// Handle error
});
i try to upload from ionic native, but it keep error while using mobile but from postman or browser it works weell
i try to upload smaller file image, it work, but when i pick the image taking from camera which is the size is more biggger than last one, it send error. is there is a maximun size to upload file to aws ? sorry for oot
i made a handle in my server when something wrong it throw to the next one, but it keep throw there. some time it work, some time it doesnt when using real device