From 9f866aa98146ea041fc36b8302c15a5354e302f3 Mon Sep 17 00:00:00 2001 From: Thuc Pham <51660321+thucpn@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:47:11 +0700 Subject: [PATCH] fix: use uploaded filename to build file url (#404) --- .../components/llamaindex/typescript/documents/upload.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/components/llamaindex/typescript/documents/upload.ts b/templates/components/llamaindex/typescript/documents/upload.ts index 10091ce0..05070cf3 100644 --- a/templates/components/llamaindex/typescript/documents/upload.ts +++ b/templates/components/llamaindex/typescript/documents/upload.ts @@ -49,7 +49,11 @@ export async function uploadDocument( } } else { // run the pipeline for other vector store indexes - const documents: Document[] = await parseFile(fileBuffer, name, mimeType); + const documents: Document[] = await parseFile( + fileBuffer, + fileMetadata.name, + mimeType, + ); documentIds = await runPipeline(index, documents); } -- GitLab