为什么浏览器对有些图片是直接预览打开,对有些图片是直接下载?—— 原由就在Content-Type
响应头上;
Content-Type响应头的作用:
Content-Type
用于向接收方说明传输资源的媒体类型,从而让浏览器用指定码表去解码。
DEFAULT("default","application/octet-stream"),
JPG("jpg", "image/jpeg"),
TIFF("tiff", "image/tiff"),
GIF("gif", "image/gif"),
JFIF("jfif", "image/jpeg"),
PNG("png", "image/png"),
TIF("tif", "image/tiff"),
ICO("ico", "image/x-icon"),
JPEG("jpeg", "image/jpeg"),
WBMP("wbmp", "image/vnd.wap.wbmp"),
FAX("fax", "image/fax"),
NET("net", "image/pnetvue"),
JPE("jpe", "image/jpeg"),
RP("rp", "image/vnd.rn-realpix");
标签:Type,MinIO,预览,tiff,image,jpeg,Content,上传
From: https://www.cnblogs.com/porter/p/16994982.html