问题描述
我尝试在HTML或单独的选项卡中显示SVG文件,但Nginx允许我下载它.我获取了正常的SVG文件,该文件可以在其他站点上运行,但不能在我的服务器上运行.
I try to show SVG file in HTML or separate tab but Nginx offers me to download it.I took normal SVG file which works on another site but not in my server.
哪里有问题?
以下是示例 http://proximax.ru/media/content/final /plane2.svg 同样是HTML的SVG http://proximax.ru/index/
Here is an example http://proximax.ru/media/content/final/plane2.svgAlso here SVG in HTML http://proximax.ru/index/
推荐答案
被标记为application/octet-stream
,浏览器只能提供下载,因为它不知道如何解释.
The of your image is noted as application/octet-stream
which a browser can only offer to download as it does not know how to interpret it.
从您的index.html
文件中可以明显看出您正在使用MIME类型的变体,并且不清楚该标准是否要求图片/svg 或图片/svg + xml (或标准就是它们,完全是其他东西).
From your index.html
file it is clear that you were playing around with variations of the MIME-type, and it is unclear whether the standard requires image/svg or image/svg+xml (or standards being what they are, something else entirely).
这篇关于Nginx提供下载SVG而不是显示它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!