fix: add file size and type validation for image uploads#16
fix: add file size and type validation for image uploads#16jezweb wants to merge 1 commit intoifindev:mainfrom
Conversation
- Validate image files are under 5MB before upload
- Validate only PNG/JPG files are accepted
- Show toast error messages for validation failures
- Reset file input on validation error
- Prevents large file uploads that would fail
- Matches documented limits ("PNG, JPG up to 5MB")
|
Warning Rate limit exceeded@jezweb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 10 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The todo form says "PNG, JPG up to 5MB" but doesn't actually validate:
This can cause:
Solution
Add client-side validation in
handleImageChange:Benefits
Testing
Changes