mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
set loaded image as new user image
This commit is contained in:
parent
cceee2d8c4
commit
a47b0bbfb0
|
@ -518,6 +518,18 @@ ipcRenderer.on("return-select-user-image", (event, arg) => {
|
|||
); // smaller than maxSizeMB
|
||||
|
||||
console.log(compressedFile.size);
|
||||
|
||||
blobUtil.blobToBase64String(compressedFile).then(function (base64String) {
|
||||
// update image
|
||||
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 (error) {
|
||||
console.log(error.message);
|
||||
|
|
Loading…
Reference in a new issue