Skip to content

Crash on empty file upload #21

@Ezwal

Description

@Ezwal

Using busboy and busboy-body-parser and node major version 7 and above, the application crash when dealing with an empty payload. The error thrown stems from the measure of the piped file buffer length Buffer.byteLength(d, 'binary') (index.js l.51).
The major change to Buffer break the module since d is an empty array it cause the error :
TypeError: "string" must be a string, Buffer, or ArrayBuffer. Retrograding works since the line is working before #18

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