this is a cordova camera plugin, the camera window dosent come in the middle of app and has no buttons on it the way capaicitor has
here is the image of capacitor
code is as follows
await this.camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64 (DATA_URL):
let base64Image = 'data:image/jpeg;base64,' + imageData;
localStorage.setItem("image",base64Image);
this.imm = localStorage.getItem("image");
let header = new HttpHeaders({
"authorization": '511efxxxxxxxxxxxxx6c36 '+'055dff210xxxxxxxxxxxx19b656f52783d5'
});
let formData = new FormData();
formData.append('imagess', base64Image, "base64Image.jpeg");
const sentImg:any = this.http.post('http://api.imgur.com/3/image',
base64Image,
{headers:header}).toPromise();
var imageLink = sentImg['data'].link
console.log(imageLink)
}, (err) => {
// Handle error
});
How do I get the same results in cordova ionic ?