文件上传存储到阿里云新增自定义文件名

This commit is contained in:
不做码农
2022-01-14 20:27:23 +08:00
parent b8e4cd2421
commit 4fefb4282d
7 changed files with 26 additions and 17 deletions

View File

@@ -175,7 +175,7 @@ namespace ZR.Admin.WebApi.Controllers
return ToResponse(ResultCode.CUSTOM_ERROR, "上传文件过大,不能超过 " + (MaxContentLength / 1024).ToString() + " MB");
}
(bool, string, string) result = SysFileService.SaveFile(fileDir, formFile);
(bool, string, string) result = SysFileService.SaveFile(fileDir, formFile, fileName);
long fileId = SysFileService.InsertFile(new SysFile()
{
AccessUrl = result.Item2,