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

Allow Server Side validation during upload #25

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

dragonfly4
Copy link
Contributor

This PR adds a step during the upload process to validate the uploaded file on the server side.

Use case: I allow users to upload a single file with specific restrictions. I handle the file directly during the upload without using a form button, making server-side validation essential.

This feature is optional, so those who don't need it won't have to modify their existing code.

Server side validation returns error (multiple set to true)
file-server-error

Example without server side validation (multiple set to true)
File-Success

Example for a single file with server side validation (multiple set to false)
Single-File-Error

@riasvdv riasvdv merged commit b059c4a into spatie:main Oct 18, 2024
1 check passed
@riasvdv
Copy link
Member

riasvdv commented Oct 18, 2024

Thanks!

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