I am developing an app like Instagram, and I get problem about getting picture after taking it from camera, I can get file from gallery by using input = 'file' type and put event.target.files to get File, but I am Confused at camera T_T , I want to get the image file and push it into my array then upload it to the server
this.camera.getPicture(options).then((imageData) => {
let base64Image = 'data:image/jpeg;base64,' + imageData;
console.log(base64Image);
// let fileImage = imageData.target.files; <-- cant use this function
// this.newPostData.media.files.push(fileImage);
}, (err) => {
console.log(err);
});
if I use imageData.target.files I will get error files no promise, Please help me to solve my problem