mirror of
https://github.com/run-llama/ai-chatbot.git
synced 2026-07-01 21:14:02 -04:00
Update file types and add note (#559)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user