mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-30 22:58:32 +08:00
Detect rar archives by mime type
RAR archives might not have .rar extension, see [Wikipedia](https://en.wikipedia.org/wiki/RAR_(file_format))
This commit is contained in:
parent
ccbe02218a
commit
a8864e2abd
@ -147,6 +147,9 @@ func IsZstdContent(data []byte) bool {
|
||||
if strings.HasSuffix(mtype, "script") {
|
||||
return true, true
|
||||
}
|
||||
if strings.HasSuffix(mtype, "vnd.rar) {
|
||||
return false, true
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(mtype, "audio/") {
|
||||
|
Loading…
Reference in New Issue
Block a user