Closed Gicminos closed 3 years ago
From my point of view a SVG file is not an image. Instead of using the image-type, why don't you simply use a standard file-type? You might have to override some views to display it - but you'd have to do the same with image-type. If that's not sufficient, you can always add a validation rule.
Thanks for your message,
Your point makes sense, but I filed this bug not because I need to support the SVG type, but because when the form is accessed by non-tech users they receive this error that I believe not to be user-friendly.
Hence my suggestion was to let voyager handle this error so that it would not be threw to the user.
If this is possible to be prevented via validation rules, accept my apologies in advance as I was not aware of it.
@Gicminos when you create a form with Voyager it's your duty to set validation rules so that the user cannot send anything unexpected and receive proper errors.
You can check Voyager documentation about how to apply validation and Laravel documentation about the rules: https://voyager-docs.devdojo.com/bread/introduction#validation https://laravel.com/docs/master/validation#rule-mimetypes
If I misunderstood your problem we can reopen this issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Description
I believe this is not a duplicate of https://github.com/the-control-group/voyager/issues/4543 . When a user uploads an SVG or any other image file not supported, submit returns with a 500 error instead of a user-friendly message saying that the image file is not valid.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen. This screenshot is an example suggestion:
Screenshots