-
Notifications
You must be signed in to change notification settings - Fork 261
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
safeFileName #21
Comments
that would explain why I am getting an unsupported MIME type error |
I really do hope the lib doesn't rely on file extension to set mime type, that would be extremely insecure to rely on !!
…Sent from my iPhone
On 2 Mar 2017, at 19:41, Bill Christo ***@***.***> wrote:
that would explain why I am getting an unsupported MIME type error
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I believe the MIME type error was coming from another lib that I am using in conjunction with express-fileupload as a result of the file extension missing.. |
@AlexNodex that is certainly not the case. express-fileupload uses busboy to detect mime types. :) As for this issue, thanks for bringing it up - it will be resolved in an upcoming release real soon. |
New release: v0.1.3 has been published to NPM. A new feature, courtesy of @pronein addresses this issue. You can now pass in app.use(fileUpload({ safeFileNames: true, preserveExtension: true })); Read more detail about the feature on the README. |
When safeFileName is set to true in the options, it removes the dot from the file extension thus rendering the extension useless, it might be an idea to allow dots also.
The text was updated successfully, but these errors were encountered: