This commit is contained in:
Tben 2023-05-23 16:31:49 +01:00
parent 9987b19c34
commit 9c1e8beeb0
2 changed files with 2 additions and 6 deletions

View File

@ -28,8 +28,6 @@ module.exports = async function imageInputFileToBase64({ imageInputFile, maxWidt
* @description make a request to datasquirel.com * @description make a request to datasquirel.com
*/ */
try { try {
console.log(typeof imageInputFile);
let imageName = imageInputFile.name.replace(/\..*/, ""); let imageName = imageInputFile.name.replace(/\..*/, "");
let imageDataBase64; let imageDataBase64;
let imageSize; let imageSize;
@ -73,9 +71,7 @@ module.exports = async function imageInputFileToBase64({ imageInputFile, maxWidt
const srcEncoded = canvas.toDataURL(MIME_TYPE, QUALITY); const srcEncoded = canvas.toDataURL(MIME_TYPE, QUALITY);
if (imagePreviewNode) { if (imagePreviewNode) {
document.querySelectorAll(`[data-imagepreview='image']`).forEach((img) => { imagePreviewNode.src = srcEncoded;
img.src = srcEncoded;
});
} }
res(srcEncoded); res(srcEncoded);

View File

@ -1,6 +1,6 @@
{ {
"name": "datasquirel", "name": "datasquirel",
"version": "1.1.33", "version": "1.1.34",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {