feat: Implement file upload and folder creation features by GO (#13903)

### What problem does this PR solve?

feat: Implement file upload and folder creation features

- Add file upload route in router.go
- Add file operation methods in dao/file.go
- Add util/file.go for file type detection and filename handling
- Implement file upload and folder creation endpoints in handler/file.go
- Implement file upload and folder creation logic in service/file.go
- Modify response message format in memory.go
- Add document count method in dao/document.go

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
chanx
2026-04-02 20:21:04 +08:00
committed by GitHub
parent 6c29128de1
commit bbb9b1df85
7 changed files with 596 additions and 5 deletions

View File

@@ -189,6 +189,12 @@ func (r *Router) Setup(engine *gin.Engine) {
// message.GET("", r.memoryHandler.GetMessages)
// message.GET("/:memory_id/:message_id/content", r.memoryHandler.GetMessageContent)
// }
file := v1.Group("/files")
{
file.POST("", r.fileHandler.UploadFile)
}
// provider pool route group
provider := v1.Group("/providers")
{