mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Prettified Code!
This commit is contained in:
parent
34bb479e8f
commit
b9542db209
1 changed files with 8 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue