Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracting Filename when Empty String fails #344

Open
adamup928 opened this issue Sep 11, 2023 · 0 comments
Open

Extracting Filename when Empty String fails #344

adamup928 opened this issue Sep 11, 2023 · 0 comments

Comments

@adamup928
Copy link

When extracting the filename parameter for a multipart request, currently, if the filename is an empty string, Busboy does not emit a file event.

This is because when checking for a filename here:

else if (disp.params.filename)

that line will evaluate to false since ('' == true) evaluates to false.

I suggest changing that line to read:

else if (disp.params.filename !== undefined)

Hope this helps!

@adamup928 adamup928 changed the title Extracting Filename when Empty String Extracting Filename when Empty String fails Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants