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

Keeping the original filename extension keeps more than is should #887

Closed
Wengiel31 opened this issue Sep 30, 2022 · 0 comments
Closed

Keeping the original filename extension keeps more than is should #887

Wengiel31 opened this issue Sep 30, 2022 · 0 comments
Labels

Comments

@Wengiel31
Copy link

Wengiel31 commented Sep 30, 2022

Support plan

  • Which support plan is this issue covered by? (Community, Sponsor, Enterprise): Community
  • Currently blocking your project/work? (yes/no): no?
  • Affecting a production system? (yes/no): yes

Context

  • Node.js version: 10.19.0
  • Release Line of Formidable (Legacy, Current, Next): Current
  • Formidable exact version: 3.2.4
  • Environment (node, browser, native, OS): Node
  • Used with (popular names of modules): Express

What are you trying to achieve or the steps to reproduce?

When using keepExtensions option and the original filename includes multiple dots the entire original filename is kept instead of only the part from the last dot.
Eample:
The original filename is: one.two.txt
Then the name of the file saved on the server is: random.two.txt instead of the expected random.txt
I assume it has been done on purpose to assure correct handling of files like .tar.gz, nevertheless I think the default behavior should be as shown above. It would be nice to at least have an option to control how the original filename is parsed.

What was the result you got?

random.two.txt

What result did you expect?

random.txt

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