在 Windows Azure 网站中使用 SVG [英] Use SVG in Windows Azure Websites

查看:24
本文介绍了在 Windows Azure 网站中使用 SVG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道是否可以将 SVG mime 类型添加到 Windows Azure 网站?我尝试使用 web.config 文件,但这只会破坏我的网站.

这是当前预览的限制还是我遗漏了什么?

感谢您的帮助!

解决方案

您可以在 Windows Azure 网站(在 web.config 级别)中执行的操作非常有限,但是您应该被允许在staticContent下添加mime类型:

<预><代码><配置><system.webServer><静态内容><remove fileExtension=".svg"/><mimeMap fileExtension=".svg" mimeType="image/svg+xml"/></staticContent></system.webServer></配置>

Does anyone know if it is possible to add the SVG mime type to a Windows Azure Website? I tried with a web.config file but that only broke my website.

Is this a limitation of the current preview or am I missing something?

thanks for your help!

解决方案

What you can do in Windows Azure Websites (on web.config level) is pretty limited, but you should be allowed to add the mime type under staticContent:

<configuration>
   <system.webServer>
      <staticContent>
         <remove fileExtension=".svg"/>
         <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      </staticContent>
   </system.webServer>
</configuration>

这篇关于在 Windows Azure 网站中使用 SVG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆