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

Detect mime-type directly from the file buffer #1

Open
baamenabar opened this issue Jun 14, 2018 · 0 comments
Open

Detect mime-type directly from the file buffer #1

baamenabar opened this issue Jun 14, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@baamenabar
Copy link
Collaborator

Currently we use the detection from busboy which reads the request header or extension.

Consider using the file-type module.

https://www.npmjs.com/package/file-type

but it does require the buffer to be read, so the check has to be handled async by the server, not in the fileFilter function of multer.

Still this is not a full featured defense agains attacks, is one step.

@baamenabar baamenabar added the enhancement New feature or request label Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant