question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allowedTypes validation breaks images without extension

See original GitHub issue

When loading images that do not have an extension (e. g. from a third party service), the function isTargetValid effectively breaks the gallery because most images are discarded. Currently I see no way to turn this off as the allowedTypes is checked so .* cannot be put there.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
marekdediccommented, May 20, 2018

I am making a WordPress plugin which makes galleries out of Google Drive folders - feel free to check it out at https://github.com/skaut/skaut-google-drive-gallery (some of it is in czech but not much). I am using imagelightbox for the galleries as it seems to be a good middle ground between usable and not bloated…

1reaction
rejascommented, May 8, 2018

always happy to help but most of the work was done by @osvaldasvalutis and @paxperscientiam 😃 might i ask if are you using the package in a real-life project which we could mention here, @GenaBitu ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validation of file extension before uploading file - Stack Overflow
The validation whether the uploaded file is an image is done in server side only, by checking the magic numbers in the file...
Read more >
Allow image fields to use any extensions the current ... - Drupal
Fail with a form validation error. If an existing image field is edited: no changes, ie take the currently saved list as value....
Read more >
what different about allowedTypes and extFilter? #52 - GitHub
when I settings: allowedTypes: 'image\/jpeg|bmp|jpg|png', extFilter: 'jpg ... uploader will validate both file type as well as extension.
Read more >
Check that uploaded file content matches the file extension
Dynamically generated images from the web don't necessarily have extensions on save. I think the solution to the security problem is to guard ......
Read more >
Image files and AllowedTypes - Optimizely World
I have a generic ImageFile content type that uses MediaDescriptor for jpeg, gif, png, svg etc. Now I have a requirement to restrict...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found