Remove document file type categorization from getFileType function

This commit is contained in:
2025-10-29 08:03:45 +08:00
parent 7de60ad0c0
commit 797638e67a

View File

@@ -53,12 +53,6 @@ func getFileType(ext string) string {
".bz2": true, ".xz": true, ".iso": true,
}
documentExts := map[string]bool{
".pdf": true, ".doc": true, ".docx": true, ".xls": true, ".xlsx": true,
".ppt": true, ".pptx": true, ".txt": true, ".rtf": true, ".odt": true,
".ods": true, ".odp": true,
}
switch {
case imageExts[ext]:
return "images"
@@ -68,8 +62,6 @@ func getFileType(ext string) string {
return "audios"
case archiveExts[ext]:
return "archives"
case documentExts[ext]:
return "documents"
default:
return "others"
}