修改可空类型

This commit is contained in:
陈淳
2023-01-06 10:15:37 +08:00
parent b7c9b84449
commit 576397a042
29 changed files with 82 additions and 68 deletions

View File

@@ -69,7 +69,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
//路径为: 文件路径/文件id+文件扩展名
var path = Path.Combine($"{PathConst.wwwroot}/{file.FilePath}", file.Id.ToString() + Path.GetExtension(file.FileName));
var stream = System.IO.File.OpenRead(path);
var MimeType = Common.Helper.MimeHelper.GetMimeMapping(file.FileName);
var MimeType = Common.Helper.MimeHelper.GetMimeMapping(file.FileName!);
return File(stream, MimeType, file.FileName);
}
catch