diff --git a/app/(chat)/api/files/upload/route.ts b/app/(chat)/api/files/upload/route.ts index 8da795db3..699a4cbef 100644 --- a/app/(chat)/api/files/upload/route.ts +++ b/app/(chat)/api/files/upload/route.ts @@ -11,13 +11,10 @@ const FileSchema = z.object({ .refine((file) => file.size <= 5 * 1024 * 1024, { message: 'File size should be less than 5MB', }) - .refine( - (file) => - ['image/jpeg', 'image/png', 'application/pdf'].includes(file.type), - { - message: 'File type should be JPEG, PNG, or PDF', - }, - ), + // Update the file type based on the kind of files you want to accept + .refine((file) => ['image/jpeg', 'image/png'].includes(file.type), { + message: 'File type should be JPEG or PNG', + }), }); export async function POST(request: Request) {