作业导出修改名称

This commit is contained in:
lu
2024-08-06 10:43:17 +08:00
parent 484a7650dd
commit 27b863a6a4

View File

@@ -443,7 +443,9 @@ public class CoursePortalApi extends ApiBaseController{
}
// 将临时文件移动到指定位置
Path source = tempZipFile.toPath();
Path destination = Paths.get("/home/www/elearning/upload/saveZip" + courseName + "【作业】.zip");
//生成uuid
String uuid = UUID.randomUUID().toString();
Path destination = Paths.get("/home/www/elearning/upload/saveZip/" + uuid + ".zip");
// 删除目标文件如果已存在
if (Files.exists(destination)) {