1.通过
2.通过工具类获取Content-Type
参考文章:Java通过文件名后缀确定Content-Type中的MIMEType
项目地址:https://github.com/j256/simplemagic
参考文档:
<dependency>
<groupId>com.j256.simplemagic</groupId>
<artifactId>simplemagic</artifactId>
<version>1.17</version>
</dependency>
参考文章:Java通过文件名后缀确定Content-Type中的MIMEType
项目地址:https://github.com/j256/simplemagic
参考文档:
<dependency>
<groupId>com.j256.simplemagic</groupId>
<artifactId>simplemagic</artifactId>
<version>1.17</version>
</dependency>