aboutsummaryrefslogtreecommitdiff
path: root/pkg/fileop/file.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-03 23:13:04 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-03 23:13:04 +0200
commitc2d666b43477ea7042b574ad940c508216cb0e83 (patch)
treea459b552374114c4ef9ebe9966ed6ec83bb9a11d /pkg/fileop/file.go
parent6e84441dab0a2b89869e33d7e89d14189d9b67c0 (diff)
downloadlens-c2d666b43477ea7042b574ad940c508216cb0e83.tar.gz
lens-c2d666b43477ea7042b574ad940c508216cb0e83.tar.bz2
lens-c2d666b43477ea7042b574ad940c508216cb0e83.zip
fix: Fix content type
Content type was always being set to `text/html`. Also swap lib for processing thumbnail for something that accepts HEIC.
Diffstat (limited to 'pkg/fileop/file.go')
-rw-r--r--pkg/fileop/file.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/fileop/file.go b/pkg/fileop/file.go
index 07c08e5..10e2202 100644
--- a/pkg/fileop/file.go
+++ b/pkg/fileop/file.go
@@ -12,6 +12,9 @@ func GetHashFromPath(path string) string {
}
func IsMimeTypeSupported(mimetype string) bool {
- return strings.HasPrefix(mimetype, "video") &&
+ if mimetype == "image/svg+xml" {
+ return false
+ }
+ return strings.HasPrefix(mimetype, "video") ||
strings.HasPrefix(mimetype, "image")
}