Mik*_*e C 1 svg worklight-server ibm-mobilefirst
当我尝试使用svg文件作为图像标记的源或作为背景图像URL时,我什么都看不到(并且firebug告诉我 Failed to load the given url
它看起来像是因为Worklight正在为它提供Content-Type响应头application/octet-stream.如何让Worklight发送它image/svg+xml以便它能正确显示?
终于找到了.将以下内容添加到server.xml:
<mimeTypes>
<type>svg=image/svg+xml</type>
</mimeTypes>
Run Code Online (Sandbox Code Playgroud)
[您可以通过转到服务器视图来打开server.xml.双击您的服务器以打开服务器概述,然后在Liberty Profile Settings下,单击Open server configuration ]