[opencms-dev] Fw: WYSIWYG editor images gallery doesn't support .PNG files

Claus Priisholm cpr at codedroids.com
Sun May 23 10:53:01 CEST 2004


Dang... got away from it again...

As mentioned in the previous posting on the subject, there's a method 
that states whether a filename points to an image in 
CmsPictureBrowser.java:

  /**
      * Checks, if the given filename ends with a typical picture suffix.
      * @param filename filename to be checked.
      * @return <code>true</code> if the is an image file, 
<code>false</code> otherwise.
      */

     protected boolean isImage(String filename) {
         if(filename.toLowerCase().endsWith("gif") || 
filename.toLowerCase().endsWith("jpg")
                 || filename.toLowerCase().endsWith("jpeg")) {
             return true;
         }
         else {
             return false;
         }
     }

which is called from the getFilteredPicList() in the same file. You can 
add further extensions to the isImage() method but it seems to be the 
wrong way to check for validity anyway (probably have to look at the 
resource type instead). Anyway I set the method to return true in any 
case, works for me. And then I was going to submit a bug to the 
bugtracker. Well, I finally got around to do that :-)

On 20/5-2004, at 1.08, Uwe König wrote:

>
>
> See mail of Claas Priisholm from 30 march 2004.
> Best regards,
>
> Uwe König
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
OpenCms links & API's: http://www.codedroids.com/community/opencms
--
Claus Priisholm
+45 48 22 46 46
cpr <you know what> codedroids.com
http://www.codedroids.com




More information about the opencms-dev mailing list