Modify ↓
Opened 18 years ago
Last modified 15 years ago
#1022 new defect
Wrong mime type for SVG
Reported by: | anonymous | Owned by: | Christian Boos |
---|---|---|---|
Priority: | high | Component: | GraphvizPlugin |
Severity: | minor | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
GraphvizPlugin sends wrong mime type for SVG file. Thats why I couldn't see a SVG object with Firefox's build-in SVG plugin.
I've fixed it.
Just replace this line
return req.send_file(img_path)
by this one
req.send_file(img_path, mimeview.get_mimetype(img_path))
And set import
from trac import mimeview
Attachments (0)
Change History (4)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 16 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Trac Release: | 0.10 → 0.11 |
Using GraphvizPlugin 0.7.2 I ran into this problem so I suppose this fix has been lost somewhere on the way (it fixes things for me). So
replacing
return req.send_file(img_path)
by
return req.send_file(img_path, get_mimetype(img_path))
and changing the import
from trac.mimeview.api import IHTMLPreviewRenderer, MIME_MAP
to
from trac.mimeview.api import IHTMLPreviewRenderer, MIME_MAP, get_mimetype
is still needed.
Regards, Holger
comment:4 Changed 15 years ago by
Owner: | changed from Peter Kropf to Christian Boos |
---|---|
Priority: | normal → high |
Status: | reopened → new |
Note: See
TracTickets for help on using
tickets.
Fixed w/ changeset:1731.