Commit 1ea7c80f authored by suhuiguang's avatar suhuiguang

1.文件名称后缀替换错误后缀有两个

parent 82e18a3c
......@@ -13,7 +13,7 @@ public class FileExporter {
response.reset();
response.setCharacterEncoding("utf-8");
response.setContentType(fileType.getContentType());
fileName = fileName.replaceAll("\\.", ");
fileName = fileName.replaceAll("\\..*", "");
fileName = URLEncoder.encode(fileName + fileType.getFileSufix(), "UTF-8");
response.setHeader("Content-Disposition", "attachment; filename=" + fileName + "");
response.getOutputStream().write(data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment