[英]Prevent IE aborts Images With The Wrong Mime-Type
I have a URL of an image我有一个图片的网址
https://www.biossantibodies.com/image-raw/15986.jpg https://www.biossantibodies.com/image-raw/15986.jpg
If I copy that and paste it back on Chrome / Firefox / Safari如果我将其复制并粘贴回 Chrome / Firefox / Safari
It will auto download and display, but IE doesn't do that.它会自动下载和显示,但 IE 不会这样做。
This is what I see in IE:这是我在 IE 中看到的:
Is it because of IE aborts Images With The Wrong Mime-Type ?是因为IE 中止了错误 Mime-Type 的图像吗?
I've tried adjusting adding these 2 lines in my /etc/nginx/mime.types
我试过在我的
/etc/nginx/mime.types
调整添加这两行
image/jpeg jpeg;
image/jpg jpg;
How do I bypass that ?我该如何绕过?
As suggested from @Manngo正如@Manngo所建议的
I've tried我试过了
image/jpeg jpeg;
image/jpeg jpg;
and restart my NGINX Server并重新启动我的 NGINX 服务器
service nginx restart
nginx stop/waiting
nginx start/running, process 1755
Visit the URL ( https://www.biossantibodies.com/image-raw/15986.jpg ) in IE and still see the same result.在 IE 中访问 URL ( https://www.biossantibodies.com/image-raw/15986.jpg ) 并仍然看到相同的结果。
There is no image/jpg
.没有
image/jpg
。 Even with the .jpg
extension, it should still be image/jpeg
.即使使用
.jpg
扩展名,它仍然应该是image/jpeg
。 Just change the second line as follows:只需将第二行更改如下:
image/jpeg jpeg;
image/jpeg jpg;
Basically, what you're doing is matching file extensions to mime types.基本上,您所做的是将文件扩展名与 mime 类型匹配。 If you had an extension such as
.junk
, you could add that to the list too, if that's your idea of having a good time:如果您有一个扩展名,例如
.junk
,您也可以将其添加到列表中,如果这是您玩得开心的想法:
image/jpeg junk;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.