From cf87750009d324557c8d7ae0371124f3b8ae94cb Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 9 Nov 2018 00:11:02 +0200 Subject: [PATCH] fix mp4 in chromium --- lib/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file.go b/lib/file.go index 8501fb6d..9b7fc899 100644 --- a/lib/file.go +++ b/lib/file.go @@ -233,7 +233,7 @@ func (i *File) GetFileType(checkContent bool) error { mimetype = http.DetectContentType(buffer[:n]) } - if strings.HasPrefix(mimetype, "video") { + if strings.HasPrefix(mimetype, "video") || strings.HasSuffix(mimetype, "octet-stream") { i.Type = "video" return nil }