Commit 23b8746e by songxiang

压缩包名称优化

parent 4012f52e
......@@ -120,8 +120,8 @@ public class CompressUtils {
if (ListUtils.isEmpty(fileUrlList)) {
return null;
}
zipName = FileUtils.formatName(zipName);
String tempZipName = zipName + "_" + LocalDateUtils.getYmdhmss();
String zipNameFormat = FileUtils.formatName(zipName);
String tempZipName = zipNameFormat + "_" + LocalDateUtils.getYmdhmss();
String zipFilePath = ZIP_FILE_PATH + tempZipName + ".zip";
// 检查临时文件夹是否存在,不存在就创建
String fileFolderPath = FILE_LOCAL_PATH + tempZipName;
......@@ -141,7 +141,7 @@ public class CompressUtils {
FileUtils.isDir(ZIP_FILE_PATH);
CompressUtils.zip(fileFolderPath, zipFilePath);
// 上传文件到服务器中
uploadResultInfo = OssUtils.uploadLocalFile4CustomName(zipFilePath, zipName);
uploadResultInfo = OssUtils.uploadLocalFile4CustomName(zipFilePath, zipNameFormat);
uploadResultInfo.setFileName(zipName);
} catch (Exception e) {
LOGGER.error("【压缩】压缩失败,<ERROR>:" + e.getMessage(), e);
......
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