diff --git a/gui/main.js b/gui/main.js index 3a628d30..362330ff 100644 --- a/gui/main.js +++ b/gui/main.js @@ -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) { diff --git a/gui/preload-chat.js b/gui/preload-chat.js index 00112e5a..ec2a6b5e 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -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, }