thorvg / thorvg.viewer

ThorVG Viewer is a browser-based rendering tool that shows you the image result of vector resource formats, such as SVG and Lottie. It's powered by the ThorVG engine.
https://www.thorvg.org
MIT License
18 stars 7 forks source link

Minor patches on filetype checking #17

Closed tinyjin closed 8 months ago

tinyjin commented 8 months ago
  1. Applied toLowerCase() to check filetype, previously any uppercases(like Jpg, JPG, jSoN) were failed to load. However this patch will support with those cases. (Issue: #14)

  2. Refactored some code for same logic because we have a lot of extensions to show up, I made it into array.

  3. Added jpeg Since jpeg and jpg are same type.