From 17b8423277fca3bd631264e89c80f896d633079e Mon Sep 17 00:00:00 2001 From: DJ2LS Date: Sun, 26 Feb 2023 07:49:19 +0000 Subject: [PATCH] Prettified Code! --- gui/main.js | 1 - gui/preload-chat.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gui/main.js b/gui/main.js index 542a1fdf..9d78773d 100644 --- a/gui/main.js +++ b/gui/main.js @@ -525,7 +525,6 @@ ipcMain.on("select-user-image", (event, data) => { try { // read data as base64 which makes conversion to blob easier fs.readFile(filepath.filePaths[0], "base64", function (err, data) { - var filename = path.basename(filepath.filePaths[0]); var mimeType = mime.getType(filename); diff --git a/gui/preload-chat.js b/gui/preload-chat.js index 46188633..2ea4a7a5 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -4,7 +4,6 @@ const { v4: uuidv4 } = require("uuid"); const imageCompression = require("browser-image-compression"); const blobUtil = require("blob-util"); - // https://stackoverflow.com/a/26227660 var appDataFolder = process.env.APPDATA || @@ -499,7 +498,7 @@ ipcRenderer.on("return-select-user-image", (event, arg) => { let imageFiletype = arg.mime; let imageFile = arg.data; - imageFile = blobUtil.base64StringToBlob(imageFile, imageFiletype); + imageFile = blobUtil.base64StringToBlob(imageFile, imageFiletype); var options = { maxSizeMB: 1,