MIME类型'image / jpg'与'image / jpeg'相同吗?

时间:2021-12-30 16:19:08

Pretty simple question but can't seem to find it anywhere online. I'm trying to make a program that depending on the file type will give me the extension.

很简单的问题,但似乎无法在网上找到它。我正在尝试制作一个程序,根据文件类型将给我扩展。

1 个解决方案

#1


268  

No, image/jpg is not the same as image/jpeg, only image/jpeg is recognised as the actual mime type for JPEG files.

不,image / jpg与image / jpeg不同,只有image / jpeg被识别为JPEG文件的实际mime类型。

See https://tools.ietf.org/html/rfc3745, https://www.w3.org/Graphics/JPEG/ .

请参阅https://tools.ietf.org/html/rfc3745,https://www.w3.org/Graphics/JPEG/。

Serving the incorrect Content-Type of image/jpg to IE can cause issues, see http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm.

向IE提供不正确的Content-Type of image / jpg会导致问题,请参阅http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm 。

#1


268  

No, image/jpg is not the same as image/jpeg, only image/jpeg is recognised as the actual mime type for JPEG files.

不,image / jpg与image / jpeg不同,只有image / jpeg被识别为JPEG文件的实际mime类型。

See https://tools.ietf.org/html/rfc3745, https://www.w3.org/Graphics/JPEG/ .

请参阅https://tools.ietf.org/html/rfc3745,https://www.w3.org/Graphics/JPEG/。

Serving the incorrect Content-Type of image/jpg to IE can cause issues, see http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm.

向IE提供不正确的Content-Type of image / jpg会导致问题,请参阅http://www.bennadel.com/blog/2609-internet-explorer-aborts-images-with-the-wrong-mime-type.htm 。