Commit 09c9feb1 authored by 朱晨阳's avatar 朱晨阳

下载文件限制500M

parent 2379e2c7
...@@ -1398,8 +1398,9 @@ public class CommonServiceImpl { ...@@ -1398,8 +1398,9 @@ public class CommonServiceImpl {
double totalNum = (double) (totalSize/1024/1024); double totalNum = (double) (totalSize/1024/1024);
if (totalNum > 500 ){ if (totalNum > 500 ){
this.cleanup(folderPath); this.cleanup(folderPath);
response.setHeader("content-error","所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M"); response.setHeader("content-error", URLEncoder.encode("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M", "UTF-8"));
return; response.setContentType("text/plain");
throw new BadRequest("所选文件总大小不得超过500M,当前所选文件总大小为"+totalNum+"M");
} }
// response.setContentLengthLong((int) totalSize); // response.setContentLengthLong((int) totalSize);
addFolderToZip(zipFilePath, folderPath, zos,response); addFolderToZip(zipFilePath, folderPath, zos,response);
......
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