Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBoss Seam] - Do file upload component support jpeg
 and png only?

scott.stark@jboss.org

2007-06-14


We'd need GIF images upload functionality.

Here
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=100433&postdays=0&postorder=asc&start=0
I found a statement that anonymous wrote : seamspace only supports jpeg and png

Question: does this mean that the file upload component does not support GIF format?

Another problem that we were able to solve ourselves: PNG and JPEG upload doesn't work properly in IE7, because IE7 recognizes content types in another way than e.g. FireFox 2.x and Opera 9.x do. Surprisingly IE7 cannot show images of these content types itself!

The following workaround allowed us to solve this problem:

 public void setPictureContentType(String contentType)
|   {
|     // fix for IE7
|     ontentType = contentType.replaceAll("image/x-png", "image/png");
|     contentType = contentType.replaceAll("image/pjpeg", "image/jpeg");
|     //
|     this.pictureContentType = contentType;
|   }

Any comments?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054372#4054372

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054372
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.