Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-44598

Image editor doesn't show ImageTypeExceptions

    Details

      Description

      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:

      1. Go to my account > change image
      2. Upload an image (image1.jpg)
      3. Save
      4. change image again
      5. upload a pdf
      1. Expected: Popup should show an error message to inform that this kind of files could not be used as images
      2. Current: The previously upload image is shown

      Update:
      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              felix.zhang Felix Zhang
              Reporter:
              roberto.diaz Roberto Díaz
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 43 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1