Skip to content

feature #14846 : Avatar filename can be in lowercase if login is in u… #1402

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

Closed
wants to merge 1 commit into from

Conversation

SilverDav
Copy link
Contributor

…ppercase (and vice-versa)

Copy link

@mmoqui mmoqui self-assigned this Apr 30, 2025
if (ignoreCaseForPropertyValue) {
avatar = avatar.exists()?avatar:new File(FileRepositoryManager.getAvatarPath(), fileName.toUpperCase());
}
return avatar;
Copy link
Member

Choose a reason for hiding this comment

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

Pb here: it doesn't work if the login is in uppercase and the avatar filename is in lowercase. If the character case has to be ignored, then all the possibility has to be taken into account when accessing the avatar file. This isn't possible without having a complex and stupid code.

The better way is to fix the convention on the avatar filename as to be the one of the login (which cannot be modified) and then ensure the avatar upload satisfies this rule. It shouldn't a diff between the avatar filename and the login.

@mmoqui
Copy link
Member

mmoqui commented May 27, 2025

This PR is closed because the issue comes from the operator who uploads a set of avatars. He didn't care about the case of the filenames in his Windows machine. (The name of the avatar files must be in lowercase.) The code doesn't have to be complicated for just such a stuff.

@mmoqui mmoqui closed this May 27, 2025
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.

2 participants