473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with reading image file in Firefox

Hi,

Is there anybody who knows why my following java/Groovy code does not work in Firefox?

The function ImageIO.createImageInputStream returns NULL in Firefox.

The code works fine in Windows Explorer.

--------------------------------------------------------
def getImageFormat(CommonsMultipartFile imageFile) {

String imageFormat
def file = new File(imageFile.fileItem.name)
ImageInputStream imageStream = ImageIO.createImageInputStream(file);
if (imageStream != null) {
Iterator<ImageReader> readers = ImageIO.getImageReaders(imageStream);

if(readers.hasNext()) {
ImageReader reader = readers.next()
imageFormat = reader.getFormatName()
}

imageStream.close();
}

return imageFormat
}
Jan 29 '10 #1
0 1315

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: MicFra | last post by:
hi, i got a little problem with pdf-serializing after updating from cocoon 2.1.2 to 2.1.4. following scenario: - using serializer org.apache.cocoon.serialization.FOPSerializer, with name...
5
by: The Googler | last post by:
Here is the site in question: http://dev.unmeaningflattery.com/ Open it in Firefox (this problem does not occur in IE). Click on one of the image thumbnails to see the larger image appear...
3
by: binnyva | last post by:
Hi everyone. I just made a JavaScript program to read a RSS feeds and display it in a HTML file. The script - Jasfer or JAvaScript FEed Reader - is available at...
2
by: Nick Wedd | last post by:
Here is a test page http://www.maproom.org/maps/historical/droysens/1886/testj.html which uses a Java applet to take a .DjVu format file and display the image which it encodes. The page is simple...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
23
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine...
1
by: ntombikayise | last post by:
Hi, I urgently need help. My code should let a user select an image file for upload, view the image on the browser to be able to set the image size then upload the image. It should also be...
1
by: awolfe76 | last post by:
The xml and javascript are below. IE finds everything fine, Firefox gives the following error - xmlDoc.getElementsByTagName("lab_name") has no properties on this line -...
3
by: macca | last post by:
Hi people! I'm having a problem with a file upload script that I'm writing. It works with Firefox but not Internet explorer. When the form is submitted(to it's self) it check for a file upload...
6
by: Tim Streater | last post by:
The statement: myImage.src = "wiggy.jpg"; appears to be a no-operation in FireFox 2.0.0.14 under XP. Works fine in IE7 (XP) and on the Mac under Safari and FF. myImage points to an <img...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.