diff --git a/ui/src/api/knowledge/document.ts b/ui/src/api/knowledge/document.ts index 806ffa0f9..54a79a44c 100644 --- a/ui/src/api/knowledge/document.ts +++ b/ui/src/api/knowledge/document.ts @@ -159,7 +159,7 @@ const exportDocument: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportExcel( - document_name + '.xlsx', + document_name.trim() + '.xlsx', `${prefix.value}/${knowledge_id}/document/${document_id}/export`, {}, loading, @@ -180,7 +180,7 @@ const exportDocumentZip: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportFile( - document_name + '.zip', + document_name.trim() + '.zip', `${prefix.value}/${knowledge_id}/document/${document_id}/export_zip`, {}, loading, diff --git a/ui/src/api/system-resource-management/document.ts b/ui/src/api/system-resource-management/document.ts index bc1b9a4e4..8031880e7 100644 --- a/ui/src/api/system-resource-management/document.ts +++ b/ui/src/api/system-resource-management/document.ts @@ -149,7 +149,7 @@ const exportDocument: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportExcel( - document_name + '.xlsx', + document_name.trim() + '.xlsx', `${prefix}/${knowledge_id}/document/${document_id}/export`, {}, loading, @@ -170,7 +170,7 @@ const exportDocumentZip: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportFile( - document_name + '.zip', + document_name.trim() + '.zip', `${prefix}/${knowledge_id}/document/${document_id}/export_zip`, {}, loading, diff --git a/ui/src/api/system-shared/document.ts b/ui/src/api/system-shared/document.ts index 2f0f60ba2..080c776da 100644 --- a/ui/src/api/system-shared/document.ts +++ b/ui/src/api/system-shared/document.ts @@ -149,7 +149,7 @@ const exportDocument: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportExcel( - document_name + '.xlsx', + document_name.trim() + '.xlsx', `${prefix}/${knowledge_id}/document/${document_id}/export`, {}, loading, @@ -170,7 +170,7 @@ const exportDocumentZip: ( loading?: Ref, ) => Promise = (document_name, knowledge_id, document_id, loading) => { return exportFile( - document_name + '.zip', + document_name.trim() + '.zip', `${prefix}/${knowledge_id}/document/${document_id}/export_zip`, {}, loading,