提交 06a437fd 编写于 作者: O o2sword

修复一键下载标题超长的问题

上级 4895113d
......@@ -78,6 +78,9 @@ class ActionBatchDownloadWithWorkOrWorkCompleted extends BaseAction {
}
}
if (StringUtils.isBlank(fileName)) {
if(title.length()>60){
title = title.substring(0, 60);
}
fileName = title + DateTools.format(new Date(), DateTools.formatCompact_yyyyMMddHHmmss) + ".zip";
} else {
String extension = FilenameUtils.getExtension(fileName);
......
......@@ -78,6 +78,9 @@ class ActionBatchDownloadWithWorkOrWorkCompletedStream extends BaseAction {
}
}
if (StringUtils.isBlank(fileName)) {
if(title.length()>60){
title = title.substring(0, 60);
}
fileName = title + DateTools.format(new Date(), DateTools.formatCompact_yyyyMMddHHmmss) + ".zip";
} else {
String extension = FilenameUtils.getExtension(fileName);
......
......@@ -89,6 +89,9 @@ class ActionUploadWorkInfo extends BaseAction {
try {
String name = "";
byte[] bytes;
if(title.length()>60){
title = title.substring(0, 60);
}
if ("word".equals(flag)) {
try (POIFSFileSystem fs = new POIFSFileSystem();
InputStream is = new ByteArrayInputStream(workHtml.getBytes("UTF-8"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册