Forum OpenACS Development: SVG on AOLServer

Collapse
Posted by Matthew Taylor on
Hi,
Does anyone know whether SVG files can be viewed on AOLServer. I have been trying however they do not seem to appear when referenced.
If the file is converted to gif it seems to work.
Collapse
2: Re: SVG on AOLServer (response to 1)
Posted by Patrick Giagnocavo on
There are two things I would check.

First, does your web browser properly display SVG files?

Second, if the web browser does display SVG files, then probably the MIME-type is not being set right when AOLserver serves the file.  In this case, adding the proper MIME type to the AOLserver config.tcl file should fix it.

Collapse
3: Re: SVG on AOLServer (response to 2)
Posted by Matthew Taylor on
Thanks for your help Patrick.

In addition to your advice I found that I have to use the <embed> tag as oppossed to the <img> tag, if anyone else is interested.

Collapse
4: Re: SVG on AOLServer (response to 1)
Posted by Jade Rubick on
Matthew, can describe exactly what you did to get an SVG file working? It would be nice to have this for future reference, and I might link it in to the FAQ.
Collapse
5: Re: SVG on AOLServer (response to 4)
Posted by Matthew Taylor on
Sure Jade,
I did the following:

1. Added svg mime type to config.tcl file at "ns_section ns/mimetypes" like so
ns_param  .svg              image/svg+xml

2. Then to view a SVG file it needs to be referenced like so
<EMBED SRC="filename.svg" NAME="SVGEmbed" HEIGHT=400 WIDTH=100%
TYPE="image/svg+xml" PLUGINSPAGE="http://www.adobe.com/svg/viewer/install/">

Hope this helps

Matt