Closed Bug 368009 Opened 17 years ago Closed 17 years ago

Can't open SVG from local file system

Categories

(Firefox :: File Handling, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 303581

People

(Reporter: wizofaus, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

If I try to load an SVG from my local file-system into Mozilla, it prompts me with the "You have chosen to open...which is a Scalable Vector Graphics" etc. etc.
This appears to be because Firefox insists on the MIME type being image/svg+xml for SVG's to display correctly, which, incidentally, causes problems with a number of popular websites that do not serve the "correct" mime-type.


Reproducible: Always
I saw this too, in firefox, but I think it is a bug (but not with mime types and so on, as you hypothesize): https://bugzilla.mozilla.org/show_bug.cgi?id=303581 .
There is a work around there to try. It worked for me:

<< Here is a work around this problem, as offered by the original poster, but with
a change to avoid endless loop of opening tabs:

1. When opening a local SVG file and the "Save As" dialog comes up, select "Open
With" and then select any .exe (does not matter which one, except do not use
firefox.exe to avoid an endless loop). Also, select "Always open this type..."
check box.

2. Go to Tools > Options... > Downloads > View & Edit Actions...  and
remove the file association for SVG (it bogus, evidently)

3. Load local SVG document. It should be rendered correctly by the native renderer. >> 
    -- JP Fiset  

----
Hopefully, mozilla can figure out why this sometimes happens, and work to prevent it from ever occuring. Personally, all I can offer in helping to troubleshoot the issue is that once, a year ago, I had disabled svg support in firefox to allow the use of adobe's viewer. I had since re-enabled svg support in firefox. 

---


The lack of a mime type is most likely NOT the issue here, when the file is being loaded locally. Mozilla doesn't use mime type for locally loaded files (obviously), and svg is unexceptional in this regard. (Incidently mime types are important on the web, and popular web sites that don't care about properly serving svg should be, and, in my experience are being, fixed. SVG is not like html, where any old way of working will do. It is meant to be used in a stricter fashion.)

There is, however, a related outstanding bug to do with svgz, and other files with some default content encoding, not working locally. https://bugzilla.mozilla.org/show_bug.cgi?id=52282
But this is not what is being reported in this bug.

Dupe of Bug 303581?
I once had the same with flash files, and it my case it proved to be some setting in about:config. So you can find out if this is something similar by temporarily renaming prefs.js.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.