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

FileInputValidator accept is not case insensitive #97

Closed
nischi opened this issue Nov 18, 2024 · 2 comments · Fixed by #98
Closed

FileInputValidator accept is not case insensitive #97

nischi opened this issue Nov 18, 2024 · 2 comments · Fixed by #98

Comments

@nischi
Copy link

nischi commented Nov 18, 2024

Hi @hackingharold

I realized that the accept Validator is not working like the accept attribute in HTML. The accept attribute is case insensitive but the accept Validator in FileInputValidator is case sensitive.

The parseAttribute function get the accept attribute value as lowercase and the check in isAcceptedByExtension works with endsWith which is case sensitive. So all files which has upper case file extension will be a wrong extension.

I will provide a pull request in the near future.

kind regards,
nischi

nischi pushed a commit to nischi/ngx-dropzone that referenced this issue Nov 18, 2024
Fix issue where accept validator return false if file extension is
uppercase. Accept validator should be case insensitive.

Closes hackingharold#97.
@hackingharold
Copy link
Owner

Hi @nischi,

very well spotted, thanks for your contribution.

@nischi
Copy link
Author

nischi commented Nov 20, 2024

Thanks a lot

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 a pull request may close this issue.

2 participants