|
|
@ -154,9 +154,11 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course |
|
|
|
var files = attachments.Select(x => $"{webRootPath}{"\\" + x.RelativePath}").ToArray(); |
|
|
|
var files = attachments.Select(x => $"{webRootPath}{"\\" + x.RelativePath}").ToArray(); |
|
|
|
if (files.Length > 0) |
|
|
|
if (files.Length > 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CreateZip($"{webRootPath}{outPath}", files); |
|
|
|
if (files.Length > 1) |
|
|
|
|
|
|
|
CreateZip($"{webRootPath}{outPath}", files); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
outPath = files[0]; |
|
|
|
return ServiceResult<string>.OprateSuccess(null, outPath); |
|
|
|
return ServiceResult<string>.OprateSuccess(null, outPath); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
return ServiceResult<string>.OprateFailed("该课件无附件!"); |
|
|
|
return ServiceResult<string>.OprateFailed("该课件无附件!"); |
|
|
|