From adc3c0781e27a13cd74470619954ab8280e9af96 Mon Sep 17 00:00:00 2001 From: Daishan Peng Date: Thu, 3 Oct 2024 13:35:00 -0700 Subject: [PATCH] Fix: Add uploadID to knowledge file Signed-off-by: Daishan Peng --- apiclient/types/knowledge.go | 1 + pkg/api/handlers/files.go | 1 + 2 files changed, 2 insertions(+) diff --git a/apiclient/types/knowledge.go b/apiclient/types/knowledge.go index 32c7b1884..a30443825 100644 --- a/apiclient/types/knowledge.go +++ b/apiclient/types/knowledge.go @@ -10,6 +10,7 @@ type KnowledgeFile struct { RemoteKnowledgeSourceType RemoteKnowledgeSourceType `json:"remoteKnowledgeSourceType,omitempty"` IngestionStatus IngestionStatus `json:"ingestionStatus,omitempty"` FileDetails FileDetails `json:"fileDetails,omitempty"` + UploadID string `json:"uploadID,omitempty"` } type FileDetails struct { diff --git a/pkg/api/handlers/files.go b/pkg/api/handlers/files.go index 499520ec6..75367ac43 100644 --- a/pkg/api/handlers/files.go +++ b/pkg/api/handlers/files.go @@ -125,6 +125,7 @@ func convertKnowledgeFile(file v1.KnowledgeFile, ws v1.Workspace) types.Knowledg FileDetails: file.Status.FileDetails, RemoteKnowledgeSourceID: file.Spec.RemoteKnowledgeSourceName, RemoteKnowledgeSourceType: file.Spec.RemoteKnowledgeSourceType, + UploadID: file.Status.UploadID, } }