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

Iconic preview isn't working for uppercase extensions #946

Closed
5 tasks done
Roluc opened this issue Apr 26, 2017 · 0 comments
Closed
5 tasks done

Iconic preview isn't working for uppercase extensions #946

Roluc opened this issue Apr 26, 2017 · 0 comments

Comments

@Roluc
Copy link

Roluc commented Apr 26, 2017

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of bootstrap-fileinput.
  • This is not an usage question. I confirm having read the plugin documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  1. Upload two images one with an uppercase extension, the other one lowercase
    image

Only the lowercase extension will be displayed as iconic preview...

I saw on line 938 - 941 that you are checking for an iconic template against the 'previewFileIconSettings':
ext = fname.split('.').pop();
if (self.previewFileIconSettings && self.previewFileIconSettings[ext]) {
out = self.previewFileIconSettings[ext];
}

The templates are maintained in lowercase, so it won't find an iconic template for uppercase extensions. Maybe the extension should be transformed to lowercase before retrieving the template, so the iconic preview also works for uppercase extensions.

Thanks in advance

Libraries

  • jQuery version: 1.11.4
  • bootstrap-fileinput version: 4.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants