Type is set in IIS, cannot disply SVG file

IIS MimeTypes

I have an image tag with an svg file:

<img src="/uploadedImages/temp/Example.svg?n=9368" alt="testsvg" title="testsvg" align="middle">

which won't display in any browser. I can see in Developer Tools that the Content-Type is coming through as application/octet-stream. However, in IIS 7.5, I DO have the MIME-Type set as image/svg+xml (see attached screenshot in link "IIS MimeTypes" above). I also tried setting it in the web.config as follows:

<staticContent>
    <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>

but that also did not help. What am I missing? How do I get the correct Mime-type to load so that the image can show in the browser? (By the way, in IE, if I browse to the file's location, the image DOES show. But not in Chrome and Firefox, they merely want to download the file instead of display it.)

链接地址: http://www.djcxy.com/p/47046.html

上一篇: 将SVG图像拖到画布上显示空白

下一篇: Type在IIS中设置,不能显示SVG文件