init pdf images branch

This commit is contained in:
starmorph
2025-05-15 12:11:15 -07:00
parent 635d6359b8
commit d8c8a85f90

View File

@@ -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) {