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

Support file extensions in uppercase #289

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

matthieuprat
Copy link
Contributor

Since version 1.3.1 (fa64570), the extension of an attachment is validated against its content type. However, when the extension is not in lowercase, validation fails.

This commit fixes the issue by downcasing the attachment's extension before checking it against possible extensions for the content type.

Since version 1.3.1 (fa64570), the extension of an attachment is
validated against its content type. However, when the extension is not
in lowercase, validation fails.

This commit fixes the issue by downcasing the attachment's extension
before checking it against possible extensions for the content type.
@Mth0158 Mth0158 added the bug Something isn't working label Nov 12, 2024
Copy link
Collaborator

@Mth0158 Mth0158 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR!
That's a case we didn't handle, thanks for adding the tests also :)

test/dummy/app/models/content_type/validator/check.rb Outdated Show resolved Hide resolved
@Mth0158 Mth0158 merged commit 9002bee into igorkasyanchuk:master Nov 12, 2024
21 of 22 checks passed
Mth0158 pushed a commit that referenced this pull request Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants