Skip to content

Busboy does not reliably parse file from FormData #267

@MihkelPajunen

Description

@MihkelPajunen

I have encountered an issue when trying to parse larger FLAC files using Busboy. Sometimes, the file is parsed as one would expect, but other times, the stream remains stuck indefinitely. This is especially true when the file size increases.

Now, I must admit that I don't have an extensive JavaScript background, so it could very well be the case that I have overlooked something obvious. However, I did pose the question on Stack Overflow and a more seasoned developer could not figure it out either.

To help as much as I can, I have created a scenario that illustrates the issue first-hand. It consists of a minimal front-end that accepts a FLAC file, which is then sent to an endpoint as a FormData() object. The back-end receives the request and parses it using Busboy. The problem occurs when I try to pipe the file to createWriteStream(), as this can stall forever. Is the problem with my code, or is Busboy not streaming the file data? I ask because I cannot find any errors in my code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions