Replies: 1 comment
-
There is no problem about the write buffer code import fs from 'fs';
const binaryFile = Buffer.from(JSON.stringify({
a: 'test'
}));
fs.promises.writeFile('./test.txt', binaryFile);
// check the file test.txt content, you will get string '{"a":"test"}' maybe the problem is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to write buffered data to my file using fs but it does not work. What could be the problem?
`async import(dto: ImportDto, veritabaniId: number): Promise {
const quadDto = new QuadBulkCreateDto();
quadDto.quads = JSON.parse(dto.file.data);
}`
Beta Was this translation helpful? Give feedback.
All reactions