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