feat: add file upload for materials (PDF/DOCX) with ingestion pipeline

This commit is contained in:
root
2026-04-29 15:52:35 +09:00
parent 518370b93e
commit 7f503326f9
51 changed files with 4712 additions and 27 deletions

View File

@@ -0,0 +1,20 @@
package ingestion
import (
"strings"
"github.com/nguyenthenguyen/docx"
)
func ParseDOCX(path string) (string, error) {
reader, err := docx.ReadDocxFile(path)
if err != nil {
return "", err
}
defer reader.Close()
doc := reader.Editable()
text := doc.GetContent()
return strings.TrimSpace(text), nil
}