Prettified Code!

This commit is contained in:
DJ2LS 2023-02-26 08:22:38 +00:00 committed by GitHub Action
parent 34bb479e8f
commit b9542db209

View file

@ -518,17 +518,18 @@ ipcRenderer.on("return-select-user-image", (event, arg) => {
console.log(compressedFile.size);
blobUtil.blobToBase64String(compressedFile).then(function (base64String) {
blobUtil
.blobToBase64String(compressedFile)
.then(function (base64String) {
// update image
document.getElementById('userImage').src = 'data:' + imageFiletype + ';base64,' + base64String;
document.getElementById("userImage").src =
"data:" + imageFiletype + ";base64," + base64String;
//TODO: add image to user database
}).catch(function (err) {
document.getElementById('userImage').src = "img/icon.png";
})
.catch(function (err) {
document.getElementById("userImage").src = "img/icon.png";
});
})
.catch(function (error) {
console.log(error.message);