Affects Version/s: 7.0.0 M3
Component/s: ~ [Archived] Frontend Infrastructure
Image editor is prepared to upload images.
If you try to upload a file that is not a image it fails and thows a controled exception (ImageTypeException- see UploadImageAction:177), but in the interface it is not shown.
I pressume that this is produced because the file upload is asyncronous, so a js component (LogoEditor) is reloading the popup before than the file has finish its upload process, so any exception produced in during this proccess will be hide to the user.
It's even weird, because the last succesfuly tempFile still exists so it is show to the user.
Steps to reproduce:
- Go to my account > change image
- Upload an image (image1.jpg)
- change image again
- upload a pdf
- Expected: Popup should show an error message to inform that this kind of files could not be used as images
- Current: The previously upload image is shown
The popup was actually showing an error, but it was not marked up as an error. Making it very unnoticeable. See 'file_upload_exception_screencap.png'.
I modified the LogoEditor module to use the correct alert classes. See 'file_upload_exception_screencap_fixed.png'.
As for still showing the previously uploaded image, I think this is intended behavior. So that if the user selects an image, and then selects some other invalid file type and tries again, the original is not cleared out.