kolkov / ngx-gallery

A simple responsive native gallery component for Angular 8+.
https://ngx-gallery.kolkov.ru/
MIT License
115 stars 56 forks source link

Alter getType to use Type if specified #54

Open sqljim opened 3 years ago

sqljim commented 3 years ago

When using files from cloud storage the URL often comes in a form that is missing a file extension, or has a file extension hidden behind a authentication token etc. This change alters the getType function to respect the Type of the image. If the type of the image is not set then try and detremine the file type from the extension. This changes also adds in .mkv and .3gp file exentsions to video.

codecov[bot] commented 3 years ago

Codecov Report

Merging #54 into master will increase coverage by 0.65%. The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
+ Coverage   34.86%   35.51%   +0.65%     
==========================================
  Files          16       16              
  Lines         806      808       +2     
  Branches      185      186       +1     
==========================================
+ Hits          281      287       +6     
+ Misses        486      479       -7     
- Partials       39       42       +3     
Impacted Files Coverage Δ
...b/ngx-gallery-image/ngx-gallery-image.component.ts 20.57% <0.00%> (ø)
...ery-thumbnails/ngx-gallery-thumbnails.component.ts 25.19% <0.00%> (ø)
projects/gallery/src/lib/ngx-gallery.component.ts 34.67% <0.00%> (ø)
...x-gallery-preview/ngx-gallery-preview.component.ts 26.54% <25.00%> (ø)
projects/gallery/src/lib/ngx-gallery.service.ts 40.00% <100.00%> (+18.57%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2d8b9b...597c614. Read the comment docs.

domvanrob commented 2 years ago

I'm also running into the same issue. Would love to see this PR merged!