Can’t display svg file when host on aws s3
.svg 文件上传到 aws s3 + cloudfront 时,有可能在网页上显示不出来,通过 chrome inspect 看的话,该 svg 的 content-type 并不是 image/svg+xml 。
解决办法是在 aws s3 网页上,选中该 svg 文件,右键 -> Properties -> Metadata 中将 content-type 改为 image/svg+xml
Experience technology to change life
.svg 文件上传到 aws s3 + cloudfront 时,有可能在网页上显示不出来,通过 chrome inspect 看的话,该 svg 的 content-type 并不是 image/svg+xml 。
解决办法是在 aws s3 网页上,选中该 svg 文件,右键 -> Properties -> Metadata 中将 content-type 改为 image/svg+xml