-
Bug
-
Resolution: Fixed
-
Major
-
1.0.2
-
None
-
None
-
Magnolia CE 5.0.4
Steps to reproduce:
- create an image file with a 2 letter filename, e.g. use the attached "p1.png"
- upload this file to the DAM (everything's fine so far)
- select this file in some dialog (e.g. component dialog)
=> the file will not be displayed in the preview
=> the log will show a NPE
When you debug this, you'll see that the problem in fact is not a NPE, but "java.lang.IllegalArgumentException: Prefix string too short" on DamFilePreviewComponent line 163.
Workaround: Once you make sure, that the filename of the temp file is at least 4 letters long, things work fine. The attached patch does this, but it might not be the prettiest way...
Acceptance criteria