Writing a binary file creates a file that appears to be corrupt.
PNG file in Windows 11 reports: "It appears we don't support this file format"
docx (MS Word) file reports: "Word experienced an error trying to open this file"
I encountered the error after downloading a blob, converting to an array buffer and writing, but can also recreate with this code:
let data = await Neutralino.filesystem.readBinaryFile('temp/test.png');
await Neutralino.filesystem.writeBinaryFile(`temp/testCopy.png`, data);
For both tests (png and docx) Windows reported the file size of the copy to have increased slightly (71 bytes and 32 bytes respectively), but the on disk sizes or originals and copies are the same.
Writing a binary file creates a file that appears to be corrupt.
PNG file in Windows 11 reports: "It appears we don't support this file format" docx (MS Word) file reports: "Word experienced an error trying to open this file"
I encountered the error after downloading a blob, converting to an array buffer and writing, but can also recreate with this code:
For both tests (png and docx) Windows reported the file size of the copy to have increased slightly (71 bytes and 32 bytes respectively), but the on disk sizes or originals and copies are the same.
from neutralino.config.json: