Remove document file type categorization from getFileType function
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user