feat: add image upload validation with 2MB limit and max 5 files (#101)

- Add 2MB file size limit with client and server-side validation
- Add max 5 files limit per upload
- Add sonner toast library for better error notifications
- Create ErrorToast component with keyboard accessibility
- Batch multiple validation errors into single toast
- Validate file size in all upload methods (input, paste, drag-drop)
- Add server-side validation in /api/chat endpoint
This commit is contained in:
Dayuan Jiang
2025-12-05 19:30:50 +09:00
committed by GitHub
parent 33471d5b3a
commit e0c5d966e3
7 changed files with 193 additions and 27 deletions

View File

@@ -42,6 +42,7 @@
"react-drawio": "^1.0.3",
"react-icons": "^5.5.0",
"remark-gfm": "^4.0.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.0.2",
"tailwindcss-animate": "^1.0.7",
"zod": "^4.1.12"