I have an application where i use an upload component. I want to convert the image in base64 and to get this data. This is why i created:
getBase64(image, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
console.log(reader.result);
reader.readAsDataURL(image);
}
The issue is that i can't get this format for the uploaded image. How to solve this?