修复部署后文件下载问题
parent
ec07887315
commit
2cbcd3b94d
|
|
@ -195,7 +195,9 @@ public class OsmoticWaterRController {
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
new FileNotFoundException("文件不存在!");
|
new FileNotFoundException("文件不存在!");
|
||||||
}
|
}
|
||||||
response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filePath, "UTF-8"));
|
response.setCharacterEncoding("utf-8");
|
||||||
|
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||||
|
response.setHeader("content-disposition", "attachment;filename*=utf-8'zh_cn'" + URLEncoder.encode("GB3838-2002地表水环境质量标准.pdf", "UTF-8"));
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
OutputStream outputStream = null;
|
OutputStream outputStream = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue