From 08ee045eba711fdc9a9e2c639de6a678c79bc0e8 Mon Sep 17 00:00:00 2001 From: Vincent Lark Date: Mon, 4 Jan 2021 18:39:11 +0100 Subject: [PATCH] rely on extension only for file type detection --- files/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/file.go b/files/file.go index 36bcfb72..23874af8 100644 --- a/files/file.go +++ b/files/file.go @@ -175,7 +175,7 @@ func (i *FileInfo) detectType(modify, saveContent bool) error { case strings.HasPrefix(mimetype, "image"): i.Type = "image" return nil - case mimetype == "application/octet-stream" && is3DModelFile(i.Extension): + case is3DModelFile(i.Extension): i.Type = "3dobject" return nil case isBinary(buffer[:n], n) || i.Size > 10*1024*1024: // 10 MB