diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index a4dfbe04..52a60c5e 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -28,9 +28,9 @@ - - - + + + @@ -52,7 +52,7 @@ - + diff --git a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs index f0f24a91..5cace93c 100644 --- a/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs +++ b/Admin.NET/Admin.NET.Core/Service/File/SysFileService.cs @@ -5,6 +5,7 @@ // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! using Aliyun.OSS.Util; +using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Admin.NET.Core.Service; @@ -234,9 +235,10 @@ public class SysFileService : IDynamicApiController, ITransient /// 上传文件 🔖 /// /// + /// 存储目标路径 /// [DisplayName("上传文件")] - public async Task UploadFile([FromForm] UploadFileInput input) + public async Task UploadFile([FromForm] UploadFileInput input, [BindNever] string targetPath = "") { if (input.File == null || input.File.Length <= 0) throw Oops.Oh(ErrorCodeEnum.D8000); @@ -282,7 +284,8 @@ public class SysFileService : IDynamicApiController, ITransient //if (!VerifyFileExtensionName.IsSameType(file.OpenReadStream(), suffix)) throw Oops.Oh(ErrorCodeEnum.D8001); // 文件存储位置 - var path = _uploadOptions.Path.ParseToDateTimeForRep(); + var path = string.IsNullOrWhiteSpace(targetPath) ? _uploadOptions.Path : targetPath; + path = path.ParseToDateTimeForRep(); var newFile = input.Adapt(); newFile.Id = YitIdHelper.NextId(); @@ -309,7 +312,7 @@ public class SysFileService : IDynamicApiController, ITransient [DisplayName("上传头像")] public async Task UploadAvatar([Required] IFormFile file) { - var sysFile = await UploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType }); + var sysFile = await UploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType }, "upload/avatar"); var sysUserRep = _sysFileRep.ChangeRepository>(); var user = await sysUserRep.GetByIdAsync(_userManager.UserId); @@ -331,7 +334,7 @@ public class SysFileService : IDynamicApiController, ITransient [DisplayName("上传电子签名")] public async Task UploadSignature([Required] IFormFile file) { - var sysFile = await UploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType }); + var sysFile = await UploadFile(new UploadFileInput { File = file, AllowSuffix = _imageType }, "upload/signature"); var sysUserRep = _sysFileRep.ChangeRepository>(); var user = await sysUserRep.GetByIdAsync(_userManager.UserId); diff --git a/Web/package.json b/Web/package.json index bc3d5ef6..65588897 100644 --- a/Web/package.json +++ b/Web/package.json @@ -2,7 +2,7 @@ "name": "admin.net.pro", "type": "module", "version": "2.4.33", - "lastBuildTime": "2025.06.09", + "lastBuildTime": "2025.06.10", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", @@ -18,14 +18,14 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.3.1", - "@logicflow/core": "^2.0.14", - "@logicflow/extension": "^2.0.19", + "@logicflow/core": "^2.0.15", + "@logicflow/extension": "^2.0.20", "@microsoft/signalr": "^8.0.7", "@vue-office/docx": "^1.6.2", "@vue-office/excel": "^1.7.14", "@vue-office/pdf": "^2.0.9", "@vueuse/core": "^13.3.0", - "@vxe-ui/plugin-export-xlsx": "^4.2.1", + "@vxe-ui/plugin-export-xlsx": "^4.2.2", "@vxe-ui/plugin-render-element": "^4.0.11", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", @@ -78,8 +78,8 @@ "vue-router": "^4.5.1", "vue-signature-pad": "^3.0.2", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.6.17", - "vxe-table": "^4.13.36", + "vxe-pc-ui": "^4.6.19", + "vxe-table": "^4.13.37", "xe-utils": "^3.7.5", "xlsx-js-style": "^1.2.0" }, @@ -90,8 +90,8 @@ "@types/node": "^22.15.30", "@types/nprogress": "^0.2.3", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.33.1", - "@typescript-eslint/parser": "^8.33.1", + "@typescript-eslint/eslint-plugin": "^8.34.0", + "@typescript-eslint/parser": "^8.34.0", "@vitejs/plugin-vue": "^5.2.4", "@vitejs/plugin-vue-jsx": "^4.2.0", "@vue/compiler-sfc": "^3.5.16", @@ -102,8 +102,8 @@ "less": "^4.3.0", "prettier": "^3.5.3", "rollup-plugin-visualizer": "^6.0.3", - "sass": "^1.89.1", - "terser": "^5.41.0", + "sass": "^1.89.2", + "terser": "^5.42.0", "typescript": "^5.8.3", "vite": "^6.3.5", "vite-plugin-cdn-import": "^1.0.1",