We have been trying docunotion and ran into an issue where an image that was being downloaded was not making it to the disk correctly.
I tracked it down to this line:
|
fs.createWriteStream(path).write(buffer); // async but we're not waiting |
Changing it to fs.writeFileSync(path, buffer) fixes the issue.
It's unclear why the code does not await for the file to be written, is there any reason for that?
We have been trying docunotion and ran into an issue where an image that was being downloaded was not making it to the disk correctly.
I tracked it down to this line:
docu-notion/src/images.ts
Line 204 in f1176c5
Changing it to
fs.writeFileSync(path, buffer)fixes the issue.It's unclear why the code does not await for the file to be written, is there any reason for that?