Skip to content

Image not written to disk #112

Open
@andreialecu

Description

@andreialecu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions