mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge remote-tracking branch 'origin/ls-arq' into ls-arq
This commit is contained in:
commit
34bb479e8f
2 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue