服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-07-12 53171273a4cd9049d532f031f389364982d219d7
Tiger.Api/Controllers/Base/BaseController.cs
@@ -532,6 +532,24 @@
        }
        #endregion
        #region 先删除后新增
        [HttpPost]
        public async Task<IActionResult> AddAfterDeleteAsync([FromBody] ApiAction action)
        {
            ApiAction response;
            try
            {
                response = action.GetResponse(await Biz.Base.AddAfterDeleteAsync(action.GetDataEntity()));
            }
            catch (System.Exception ex)
            {
                response = action.GetResponse().CatchExceptionWithLog(ex);
            }
            return Ok(response);
        }
        #endregion
        #region 文件上传
        /// <summary>
        /// 文件上传
@@ -544,7 +562,7 @@
            if (file == null || file.Length == 0)
                return BadRequest("No file uploaded.");
            var path = Path.Combine(@"D:\nginx-1.26.0\html", "upload", file.FileName);
            var path = Path.Combine($@"{BizConfig.Configuration["UploadAddress"]}", "upload", file.FileName);
            using (var stream = new FileStream(path, FileMode.Create))
            {