feat: 新增 CSV、XLSX、XLS 文件类型解析支持

This commit is contained in:
begoniezhao
2025-11-19 17:27:17 +08:00
parent 3a2c86df5b
commit 587d1b2bd3
7 changed files with 118 additions and 2 deletions
+1 -1
View File
@@ -1353,7 +1353,7 @@ func (s *knowledgeService) UpdateKnowledge(ctx context.Context, knowledge *types
// isValidFileType checks if a file type is supported
func isValidFileType(filename string) bool {
switch strings.ToLower(getFileType(filename)) {
case "pdf", "txt", "docx", "doc", "md", "markdown", "png", "jpg", "jpeg", "gif":
case "pdf", "txt", "docx", "doc", "md", "markdown", "png", "jpg", "jpeg", "gif", "csv", "xlsx", "xls":
return true
default:
return false