Commit dd52d696 by 崔彦峰

fix(excel): 修复临时文件删除逻辑问题

- 移除注释标记以启用临时Excel文件删除功能
- 确保下载完成后正确清理临时文件防止磁盘空间耗尽
- 保留异常处理机制记录文件删除失败的日志信息
1 parent cf52a3bb
...@@ -71,7 +71,7 @@ public class ExcelUtils { ...@@ -71,7 +71,7 @@ public class ExcelUtils {
} }
} }
// 删除临时下载的Excel文件,防止磁盘空间耗尽 // 删除临时下载的Excel文件,防止磁盘空间耗尽
/*if (StringUtils.isNotBlank(localFileDir)) { if (StringUtils.isNotBlank(localFileDir)) {
try { try {
File tempFile = new File(localFileDir); File tempFile = new File(localFileDir);
if (tempFile.exists() && tempFile.delete()) { if (tempFile.exists() && tempFile.delete()) {
...@@ -80,7 +80,7 @@ public class ExcelUtils { ...@@ -80,7 +80,7 @@ public class ExcelUtils {
} catch (Exception e) { } catch (Exception e) {
log.warn("删除临时Excel文件失败:{}, 错误:{}", localFileDir, e.getMessage()); log.warn("删除临时Excel文件失败:{}, 错误:{}", localFileDir, e.getMessage());
} }
}*/ }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!