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

Enhance filename and display name synchronization on document upload #415

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

SimSon2710
Copy link

When uploading files, you can already synchronize the file name with the display name. The pattern '[\W_]' is currently used to replace all non-word characters with '_'. However, this procedure also replaces umlauts or other letters with accents. I have therefore extended the previous process so that umlauts and letters with accents are replaced accordingly. For the replacement rule for letters with accents, I have relied on 'source internet', as I do not speak all languages.

What's not particularly nice about the current solution is that 'toLowerCase()' and the two RegEx run over the filename a total of three times. If anyone has a better solution, please let me know :)

Add regex pattern to replace umlauts and accented characters by their corresponding simple character.
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.

None yet

1 participant