mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 同步数据后,及时清理远程Excel文件
This commit is contained in:
@@ -193,6 +193,9 @@ public class ExcelUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(fileNames.get("tranName"))) {
|
||||
FileUtils.deleteFile(path + fileNames.get("tranName"));
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
JsonNode rootNode = objectMapper.readTree(datasourceRequest.getDatasource().getConfiguration());
|
||||
@@ -411,7 +414,9 @@ public class ExcelUtils {
|
||||
excelFileData.setId(fileNames.get("tranName").split("\\.")[0]);
|
||||
excelFileData.setPath(path + fileNames.get("tranName"));
|
||||
excelFileData.setSheets(returnSheetDataList);
|
||||
|
||||
if (StringUtils.isNotEmpty(fileNames.get("tranName"))) {
|
||||
FileUtils.deleteFile(path + fileNames.get("tranName"));
|
||||
}
|
||||
return excelFileData;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user