-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Improve keep extension #857
Conversation
@@ -497,6 +507,9 @@ class IncomingForm extends EventEmitter { | |||
return originalFilename; | |||
} | |||
|
|||
// able to get composed extension with multiple dots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i remember pretty clearly there was some reason for that, some report or feature or issue.. but i don't remember the reason haha, so we can switch back to just getting the thing after the last dot with Node's builtin and all the drama goes to the trash.
*/ | ||
// slugify to avoid invalid filenames | ||
// substr to define a maximum | ||
return `${slugify(name)}.${slugify(ext, {separator: ''})}`.substr(0, 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we better use filenamify
instead.
filenamify(name, { replacement: '-' })
there will not be needed for ext
, because we can just return path.extname
, as per the other comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh, that's from the examples dir, lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need advice
fixes #856