rely on extension only for file type detection
This commit is contained in:
parent
45428a5e79
commit
08ee045eba
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user