revert base64 encoding before passing file to IPC

This commit is contained in:
DJ2LS 2022-11-11 15:43:02 +01:00
parent d843e716b7
commit 2534604616
2 changed files with 2 additions and 2 deletions

View file

@ -550,7 +550,7 @@ ipcMain.on('save-file-to-folder',(event,data)=>{
try {
let buffer = Buffer.from(atob(data.file));
let buffer = Buffer.from(data.file);
let arraybuffer = Uint8Array.from(buffer);
console.log(arraybuffer)
fs.writeFile(filepath.filePath, data.file, 'binary', function (err, data) {

View file

@ -863,7 +863,7 @@ function saveFileToFolder(id) {
console.log(data)
// we need to encode data because of error "an object could not be cloned"
let Data = {
file: btoa(data),
file: data,
filename: filename,
filetype: filetype,
}