Connecting Tech Pros Worldwide Help | Site Map

Firefox security blocking image preview script

Newbie
 
Join Date: Sep 2006
Posts: 1
#1: Sep 24 '06
Hello all

I am new here and this is my first post.

I have tried several javascripts to preview an image on a web page using the "input type=file" to Browse and preview the image.

Using IE the image preview works fine but not in Firefox/Netscape. From reading many many threads from various sources I gather the problem is Foxfire's security settings that prevent the image from loading. I verified this by viewing the Javascritp Console. The Console message indeed says the upload was aborted do to security.

Somewhere I saw a way to enter a url in firefox that allows the user to change security settings that can not be accessed through the standard menus. I have tried and tried but can not find where I saw this. Does anyone know where this info is available?
OR
Does anyone know of a workaround/javascript that will allow previewing an image in Firefox?

Thanks
Lou Petkus
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Nov 23 '06

re: Firefox security blocking image preview script


I have been stuck on the same problem and while searching came across this post.

Apparently, Firefox does not allow access to local files from remote sites.

See this Mozillazine page for possible solutions.

But, it's all fine if I can view the images but I want all Firefox users to be able to preview the images.

Does anyone know of any client-side JavaScript-based solutions that does not require users to change any security settings or change any files or download any extensions? Surely, it's obvious that an image file with an extension of .gif, .jpg, .png or .bmp, etc. is not going to compromise security or am I missing something?!
Reply