Skip to content

Conversation

@AbrahamX3
Copy link

@AbrahamX3 AbrahamX3 commented Nov 10, 2024

Description

This PR adds simple file validation when handling Image and SVG file uploads using their mime type. The error is displayed via a toast using sonner (useful for handling future error messages!)

Preview

Arc_KQFjEXjlrm.mp4

Current

Production currently lets you upload any file type, so this PR fixes that.

image

@vercel
Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quickpic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2024 10:15am

@AbrahamX3
Copy link
Author

Also added toast errors in case file is somehow missing when uploading a file.

@t3dotgg
Copy link
Owner

t3dotgg commented Nov 11, 2024

I added a shitty alert before I saw this 😭 down to rebase it on current state and move the alerts there?

@AbrahamX3
Copy link
Author

I added a shitty alert before I saw this 😭 down to rebase it on current state and move the alerts there?

Sure thing, I made validation even better and more dynamic for future tools, check out #65!

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