[jboss-user] [JBoss Seam] - Re: Do file upload component support jpeg and png only?
shakenbrain
do-not-reply at jboss.com
Thu Jun 14 16:17:50 EDT 2007
>From ContentServlet.java
String formatName = "";
| if ("image/png".equals(contentType))
| formatName = "png";
| else if ("image/jpeg".equals(contentType))
| formatName = "jpeg";
|
| ImageIO.write(bImg, formatName, response.getOutputStream());
You'd have to update this to allow for "gif" format types, but that assumes that ImageIO supports writing GIFS. Based on "http://www.gif4j.com/java-gif4j-pro-gif-image-encode-save.htm" you'll need an extra library.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054528#4054528
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054528
More information about the jboss-user
mailing list