ngx-gallery
ngx-gallery copied to clipboard
Alter getType to use Type if specified
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 Report
Merging #54 into master will increase coverage by
0.65%
. The diff coverage is33.33%
.
@@ 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.
I'm also running into the same issue. Would love to see this PR merged!