fix bug ie无法回显png
This commit is contained in:
+2
-4
@@ -172,10 +172,8 @@ public class CommonController {
|
|||||||
response.setContentType("application/force-download");// 设置强制下载不打开
|
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||||
if (type == null) {
|
if (type == null) {
|
||||||
fileName = StringUtils.lowerCase(fileName);
|
fileName = StringUtils.lowerCase(fileName);
|
||||||
if (fileName.contains(".jpg") || fileName.contains(".gif") || fileName.contains(".jpeg")) {
|
if (fileName.contains(".jpg") || fileName.contains(".gif") || fileName.contains(".jpeg")||fileName.contains(".png")) {
|
||||||
response.setContentType("image/jpeg;image/jpg;image/gif;image/png");
|
response.setContentType("image/jpeg;image/png;image/gif;image/jpg;");
|
||||||
} else if (fileName.contains(".png")) {
|
|
||||||
response.setContentType("image/png;image/jpg;image/gif;image/jpeg");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outputStream = response.getOutputStream();
|
outputStream = response.getOutputStream();
|
||||||
|
|||||||
Reference in New Issue
Block a user