Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Client and Server-Side Validation for Image Uploads(Main Branch) #71

Merged
merged 2 commits into from
Feb 15, 2025

Conversation

01bps
Copy link
Contributor

@01bps 01bps commented Feb 15, 2025

This implements client and server-side validation to restrict image uploads to specific formats (.jpg, .jpeg, .png, .gif, .webp, .heif, .pdf).
It prevents unsupported file uploads, improves UX with immediate feedback, and reduces server load.

Changes include:

  • File type restrictions in the picker
  • JavaScript validation
  • error message on selecting other formats.
  • server-side checks using ALLOWED_EXTENSIONS and allowed_file() in the upload route.

Checklist:

@mdxabu
Copy link
Collaborator

mdxabu commented Feb 15, 2025

LGTM 🚀

@mdxabu mdxabu merged commit f9f9eb3 into KathiraveluLab:main Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants