mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-03 00:21:34 +03:00
* Fix writeBinaryFile to call the correct command Fixes #1133 writeBinaryFile was reusing writeFile, which was happily saving base64 encoded strings to the fs. This instead uses the correct WriteBinaryFile command, which base64 decodes. However why are we encoding and then decoding, why can we not just send a raw byte array to be saved as a file? This is left for a later PR. * Shorten changelog line per review
This commit is contained in:
parent
5810bae022
commit
486bd920f8
6
.changes/writeBinaryFile.md
Normal file
6
.changes/writeBinaryFile.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri.js": patch
|
||||
"tauri": minor
|
||||
---
|
||||
|
||||
Match writeBinaryFile command name between js and rust
|
@ -166,7 +166,7 @@ async function writeBinaryFile(
|
||||
}
|
||||
|
||||
return await promisified({
|
||||
cmd: 'writeFile',
|
||||
cmd: 'writeBinaryFile',
|
||||
path: file.path,
|
||||
contents: arrayBufferToBase64(file.contents),
|
||||
options
|
||||
|
Loading…
Reference in New Issue
Block a user