From 99f99626dee2e24da92bc8a481a363bee010414a Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 19 Aug 2022 16:51:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?app2.0=20=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=8E=B7=E5=8F=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/StuInfoFreshApi.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs index 3d066f66a..c726b3225 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs @@ -357,10 +357,12 @@ namespace Learun.Application.WebApi.Modules { var files = (List)this.Context.Request.Files; var folderId = this.GetReq().folderId;//文件夹id=新生id + var name = this.GetReq().name;//文件夹id=新生id + string filePath = Config.GetValue("AnnexesFile"); string uploadDate = DateTime.Now.ToString("yyyyMMdd"); - string FileEextension = Path.GetExtension(files[0].Name); + string FileEextension = name; string fileGuid = Guid.NewGuid().ToString(); string virtualPath = string.Format("{0}/{1}/{2}/{3}{4}", filePath, userInfo.userId, uploadDate, fileGuid, FileEextension); @@ -496,6 +498,7 @@ namespace Learun.Application.WebApi.Modules public class FileModel { public string folderId { get; set; } + public string name { get; set; } public string id { get; set; } } } From 2f54c3ec95c271f540271ffb76362bb870223c94 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 19 Aug 2022 17:06:26 +0800 Subject: [PATCH 2/2] =?UTF-8?q?app2.0=20=E9=99=84=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E4=BF=9D=E5=AD=98=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/StuInfoFreshApi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs index c726b3225..e02ed891c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs @@ -383,7 +383,7 @@ namespace Learun.Application.WebApi.Modules //文件信息写入数据库 fileAnnexesEntity.F_Id = fileGuid; fileAnnexesEntity.F_FolderId = folderId; - fileAnnexesEntity.F_FileName = files[0].Name; + fileAnnexesEntity.F_FileName = name; fileAnnexesEntity.F_FilePath = virtualPath; fileAnnexesEntity.F_FileSize = files[0].Value.Length.ToString(); fileAnnexesEntity.F_FileExtensions = FileEextension;