文件下载乱码

This commit is contained in:
gaojiabao
2023-06-20 16:34:00 +08:00
parent c5c75fa1bd
commit 5c5233155a
@@ -348,6 +348,7 @@ public class AttFileEOController {
String fileOldName = fileNameEncoding(attFileEO.getOldFileName(),request);
response.setHeader("Content-Disposition", "attachment;filename=\""+fileOldName+"\"");
response.setContentType("application/octet-stream");
response.setCharacterEncoding("UTF-8");
File file = new File(filePath+attFileEO.getFilePath()+attFileEO.getFileName());
is = new FileInputStream(file);
os = response.getOutputStream();