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,
|
".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 {
|
switch {
|
||||||
case imageExts[ext]:
|
case imageExts[ext]:
|
||||||
return "images"
|
return "images"
|
||||||
@@ -68,8 +62,6 @@ func getFileType(ext string) string {
|
|||||||
return "audios"
|
return "audios"
|
||||||
case archiveExts[ext]:
|
case archiveExts[ext]:
|
||||||
return "archives"
|
return "archives"
|
||||||
case documentExts[ext]:
|
|
||||||
return "documents"
|
|
||||||
default:
|
default:
|
||||||
return "others"
|
return "others"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user