|
@@ -464,6 +464,9 @@ namespace IES.ExamServer.Controllers
|
|
|
_liteDBFactory.GetLiteDatabase().GetCollection<EvaluationClient>().Upsert(dataInfo.evaluationCloud!);
|
|
|
|
|
|
(successMsgs, errorMsgs) = await ManageService.CheckFile(dataInfo.evaluationCloud!, successMsgs, errorMsgs, _signalRExamServerHub, _memoryCache, _logger, deviceId, evaluationPath, Constant._Message_grant_type_download_file);
|
|
|
+ await _signalRExamServerHub.SendMessage(_memoryCache, _logger, deviceId, Constant._Message_grant_type_download_file,
|
|
|
+ new MessageContent { dataId = evaluationClient.id, dataName = evaluationClient.name, messageType = Constant._Message_type_message, status = Constant._Message_status_info, content = $"正在创建压缩包,请稍等..." });
|
|
|
+
|
|
|
//下载完成后,对数据进行检查,然后在加密压缩。
|
|
|
string zipPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "zip");
|
|
|
if (!Directory.Exists(zipPath))
|
|
@@ -472,7 +475,6 @@ namespace IES.ExamServer.Controllers
|
|
|
}
|
|
|
string zipFilePath = Path.Combine(zipPath, $"{dataInfo.evaluationCloud.id}-{dataInfo.evaluationCloud.blobHash}.zip");
|
|
|
var zipInfo = ZipHelper.CreatePasswordProtectedZip(evaluationPath, zipFilePath, dataInfo.evaluationCloud.openCode!);
|
|
|
-
|
|
|
if (zipInfo.res)
|
|
|
{
|
|
|
successMsgs.Add("评测数据压缩包创建成功!");
|