260311_02_ENH: 업로드 후 업로드 파일 삭제 적용

This commit is contained in:
2026-03-11 16:26:56 +09:00
parent a30f7d09d4
commit 844d098f8a
2 changed files with 12 additions and 0 deletions

View File

@@ -79,6 +79,8 @@ public class UploadService {
errorFile = toXlsx(failRows);
}
dataFileService.deleteListFile(dataFilePath.getFileName().toString());
return ExcelUploadResultDto.of(total.get(), success.get(), fail.get(), errorFile);
}

View File

@@ -33,4 +33,14 @@ public class DataFileService extends AbstractFileService {
throw BusinessException.internalError("FAIL_DATA_UPLOAD", e.getMessage());
}
}
public void deleteListFile(String fileName) {
Path dir = getBaseDir().toAbsolutePath().normalize();
try {
deleteFile(dir, fileName);
} catch (IOException e) {
throw BusinessException.internalError("FAIL_DATA_DELETE", e.getMessage());
}
}
}