From d8c8a85f90727694081bab4e80caaa25da929529 Mon Sep 17 00:00:00 2001 From: starmorph Date: Thu, 15 May 2025 12:11:15 -0700 Subject: [PATCH] init pdf images branch --- src/components/thread/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/thread/index.tsx b/src/components/thread/index.tsx index 064d156..d69ea53 100644 --- a/src/components/thread/index.tsx +++ b/src/components/thread/index.tsx @@ -190,6 +190,7 @@ export function Thread() { text: input, }, ...imageUrlList.map((item) => item.image), + ], }; @@ -277,8 +278,8 @@ export function Thread() { file.type.startsWith("image/"), ); - if (files.some(file => !file.type.startsWith("image/"))) { - toast.error("You have uploaded invalid file type. Please upload an image."); + if (files.some(file => !file.type.startsWith("image/") || file.type !== "application/pdf")) { + toast.error("You have uploaded invalid file type. Please upload an image or a PDF."); } if (imageFiles.length) {