mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-31 01:10:41 +01: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:
1 parent
ccbe02218a
commit
a8864e2abd
1 file changed
+3
@@ -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/") {
|
||||
|
||||
Reference in new issue
Block a user