|
@@ -14,6 +14,7 @@ using Org.BouncyCastle.Utilities;
|
|
|
using Quartz.Util;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Diagnostics;
|
|
|
+using System.IO;
|
|
|
using System.Net.Http.Headers;
|
|
|
using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
|
|
|
using static QRCoder.PayloadGenerator.SwissQrCode;
|
|
@@ -1769,7 +1770,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
{
|
|
|
return Ok(JsonView(false, "参数有误,上传失败!"));
|
|
|
}
|
|
|
- if (dto.files.Count < 1)
|
|
|
+ if (dto.files == null || dto.files.Count < 1)
|
|
|
{
|
|
|
return Ok(JsonView(false, "文件为空,上传失败!"));
|
|
|
}
|
|
@@ -1791,8 +1792,15 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
}
|
|
|
|
|
|
var path = Path.Combine(filePath, projectFileName);
|
|
|
- using var stream = new FileStream(path, FileMode.Create);
|
|
|
- await file.CopyToAsync(stream);
|
|
|
+ //using var stream = new FileStream(path, FileMode.Create);
|
|
|
+ //await file.CopyToAsync(stream);
|
|
|
+
|
|
|
+ using (FileStream fs = System.IO.File.Create(path))
|
|
|
+ {
|
|
|
+ file.CopyTo(fs);
|
|
|
+ fs.Flush();
|
|
|
+ }
|
|
|
+
|
|
|
fileUrls.Add($"/{ptfPath}公务相关文件/{projectFileName}");
|
|
|
}
|
|
|
|