diff --git a/24Hour/Controllers/Common/CommonController.cs b/24Hour/Controllers/Common/CommonController.cs index 6dee0d6..5da3584 100644 --- a/24Hour/Controllers/Common/CommonController.cs +++ b/24Hour/Controllers/Common/CommonController.cs @@ -2739,7 +2739,18 @@ namespace _24Hour.Controllers.Common #endregion #region 文件上传 + [HttpPost] + [Route("RequestDownloadFile")] + public IActionResult RequestDownloadFile(string filename) //[FromBody] dynamic Json + { + + var FileName = System.IO.Path.GetFileName(filename); + var currentDate = DateTime.Now; + var FilePath = filename; + + return new FileStreamResult(new FileStream(FilePath, FileMode.Open), "application/octet-stream") { FileDownloadName = FileName }; + } private string[] AllowedExtensions = new string[] { ".png", ".jpg", ".jpeg", ".bmp",".xlsx",".aks"}; /// /// 文件上传--附件 diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 676cd57..1303077 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -30,6 +30,7 @@ using System.IO.Compression; using System.Linq; using System.Net.WebSockets; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics.Arm; using System.Text; using static _24Hour.TwentySystemProxyClient; using static com.sun.tools.@internal.xjc.reader.xmlschema.bindinfo.BIConversion; @@ -2106,7 +2107,7 @@ namespace _24Hour.Controllers.Common var akspath = System.IO.Path.ChangeExtension(packegzipname, ".aks"); fi.MoveTo(akspath,true); //xx/xx/xx.rar - result.result = $"/temp/{packegdirname}.aks"; + result.result = fimoved.FullName; result.IsSucceed = true; logger.LogInformation("step5"); return result;