Prettified Code!

This commit is contained in:
DJ2LS 2023-02-26 07:49:19 +00:00 committed by GitHub Action
parent 61a47dbedf
commit 17b8423277
2 changed files with 1 additions and 3 deletions

View file

@ -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);

View file

@ -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,