-
Notifications
You must be signed in to change notification settings - Fork 56
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
New error handling for unsupported image types #102
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @buggyzap ,
Thanks for the PR !
The error message is displayed twice. Could you make it so that it appears just once ?
It would also be better to have a message like so : Image format not recognized, allowed formats are: gif, jpg, jpeg, jpe, png, webp
.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @buggyzap
I think you didn't need to use $this->displayError
:)
This pull request seems to contain new translation strings. I have summarized them below to ease up review:
(Note: this is an automated message, but answering it will reach a real human) |
Ok ty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @buggyzap ,
With your PR, I can't add any slider anymore. The error message is always displayed, whether I upload a supporter or unsupported image type.
When I upload a jpg or png, or any supported format, the error is displayed once.
If I upload an unsupported image format, the error is displayed twice.
Screen.Recording.2024-07-04.at.12.00.58.mov
Could you check please ?
Thanks
missclick @boherm ? |
I haven't see the Florine's comment.. 😅 |
friendly reminder @buggyzap :D |
If we try to upload a new file that is not a valid image, no errors are shown. Backoffice returns success message and image remain the same. With this little "else" check we can track if the uploaded file was included in supported extensions and/or mimetypes.