mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-01-09 00:29:57 +08:00
fix: category for filename
This commit is contained in:
parent
15a037c7ee
commit
3ca28cc06d
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
package catregory
|
||||
package category
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
@ -25,7 +25,7 @@ var (
|
|||
)
|
||||
|
||||
func GetCategory(fileName string) Category {
|
||||
fileExtension := strings.ToLower(filepath.Ext(fileName))
|
||||
fileExtension := strings.Split(strings.ToLower(filepath.Ext(fileName)), ".")[1]
|
||||
|
||||
if contains(documentExtensions, fileExtension) {
|
||||
return Document
|
||||
|
|
Loading…
Reference in a new issue