updates
This commit is contained in:
parent
285c82193f
commit
5ca2983100
@ -27,6 +27,7 @@ export default async function imageInputFileToBase64({ imageInputFile, maxWidth,
|
||||
*
|
||||
* @description make a request to datasquirel.com
|
||||
*/
|
||||
try {
|
||||
console.log(typeof imageInputFile);
|
||||
|
||||
let imageName = imageInputFile.name.replace(/\..*/, "");
|
||||
@ -97,6 +98,16 @@ export default async function imageInputFileToBase64({ imageInputFile, maxWidth,
|
||||
imageName: imageName,
|
||||
imageSize: imageSize,
|
||||
};
|
||||
} catch (error) {
|
||||
console.log("Image Processing Error! =>", error.message);
|
||||
|
||||
return {
|
||||
imageBase64: null,
|
||||
imageBase64Full: null,
|
||||
imageName: null,
|
||||
imageSize: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
|
@ -26,6 +26,7 @@ export default async function imageInputToBase64({ imageInput, maxWidth, mimeTyp
|
||||
*
|
||||
* @description make a request to datasquirel.com
|
||||
*/
|
||||
try {
|
||||
let imagePreviewNode = document.querySelector(`[data-imagepreview='image']`);
|
||||
let imageName = imageInput.files[0].name.replace(/\..*/, "");
|
||||
let imageDataBase64;
|
||||
@ -84,6 +85,15 @@ export default async function imageInputToBase64({ imageInput, maxWidth, mimeTyp
|
||||
imageBase64Full: imageDataBase64,
|
||||
imageName: imageName,
|
||||
};
|
||||
} catch (error) {
|
||||
console.log("Image Processing Error! =>", error.message);
|
||||
|
||||
return {
|
||||
imageBase64: null,
|
||||
imageBase64Full: null,
|
||||
imageName: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datasquirel",
|
||||
"version": "1.1.30",
|
||||
"version": "1.1.31",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user