Closed ronefel closed 1 month ago
images_upload_handler: (blobInfo, progress) => {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onloadend = function() {
// Get the base64 string
const base64data = reader.result;
resolve(base64data); // Return the base64 string to the editor
};
reader.onerror = function() {
reject("Failed to convert image to base64.");
};
reader.readAsDataURL(blobInfo.blob());
});
},
Is it possible to save the image in base64 in the database instead of saving it in storage?
Example:
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" width="313" height="269">