From 2f9641ee65216d5dedb95d873dccacf2ecc9a5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Sat, 23 Dec 2023 14:30:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=97=B6=E8=BF=94?= =?UTF-8?q?=E5=9B=9Eaks=E6=96=87=E4=BB=B6=E5=85=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/Controllers/Common/LawyerArchivesController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 860c297..a7534b9 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; @@ -2105,8 +2106,9 @@ namespace _24Hour.Controllers.Common var akspath = System.IO.Path.ChangeExtension(packegzipname, ".aks"); fi.MoveTo(akspath); //xx/xx/xx.rar + FileInfo fimoved = new FileInfo(akspath); - result.result = $"/temp/{packegdirname}.aks"; + result.result = fimoved.FullName; result.IsSucceed = true; logger.LogInformation("step5"); return result; From bf5c9b4b9ec380fd6935eb144a4c3f564acaa961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Sat, 23 Dec 2023 14:31:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/Controllers/Common/CommonController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"}; /// /// 文件上传--附件