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

Improve keep extension #857

Merged
merged 11 commits into from May 19, 2022
Merged

Improve keep extension #857

merged 11 commits into from May 19, 2022

Conversation

GrosSacASac
Copy link
Contributor

fixes #856

@GrosSacASac GrosSacASac merged commit 81dd350 into master May 19, 2022
@GrosSacASac GrosSacASac deleted the improve-keep-extension branch May 19, 2022 10:13
@@ -497,6 +507,9 @@ class IncomingForm extends EventEmitter {
return originalFilename;
}

// able to get composed extension with multiple dots
Copy link
Member

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);
Copy link
Member

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.

Copy link
Member

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

Copy link
Member

@tunnckoCore tunnckoCore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comments

@GrosSacASac

Copy link

@hasle4real hasle4real left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need advice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerability CVE-2022-29622 is reported by Whitesource
3 participants