不同浏览器版本打开方式设置
//文件下载设置
response.reset();
response.setContentType("application/force-download;charset=utf-8");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;fileName="+fileId+"."+suffix+"");
不同浏览器版本打开方式设置
//文件下载设置
response.reset();
response.setContentType("application/force-download;charset=utf-8");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;fileName="+fileId+"."+suffix+"");
转载于:https://www.cnblogs.com/wuzexin/p/8085471.html