Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: unable to upload avatar for search (#16437)

Haruko38643f75fdfc7fe
diff --git a/internal/service/search.go b/internal/service/search.go
index c78d79289e..21e9275615 100644
--- a/internal/service/search.go
+++ b/internal/service/search.go
@@ -294,6 +294,7 @@ type UpdateSearchRequest struct {
Name string `json:"name" binding:"required"`
Description *string `json:"description,omitempty"`
SearchConfig map[string]interface{} `json:"search_config" binding:"required"`
+ Avatar *string `json:"avatar,omitempty"`
}
func (s *SearchService) UpdateSearch(userID string, searchID string, req *UpdateSearchRequest) (*entity.Search, error) {
@@ -352,6 +353,9 @@ func (s *SearchService) UpdateSearch(userID string, searchID string, req *Update
if req.Description != nil {
updates["description"] = *req.Description
}
+ if req.Avatar != nil {
+ updates["avatar"] = *req.Avatar
+ }
// Step 6: Execute update
// Python: SearchService.update_by_id(search_id, req)