mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-06-23 00:52:07 +08:00
增加通用skills
This commit is contained in:
@@ -65,7 +65,8 @@ namespace Infrastructure.Middleware
|
||||
// 启用倒带功能,就可以让 Request.Body 可以再次读取
|
||||
request.EnableBuffering();
|
||||
// 文件上传 记录文件信息
|
||||
if (path.Contains("/upload"))
|
||||
var contentType = request.ContentType?? "";
|
||||
if (path.Contains("/upload") || contentType.Contains("multipart/form-data"))
|
||||
{
|
||||
var content = string.Join(",", request.Form.Files.Select(item => item.FileName));
|
||||
logData.Add("request.body", $"收到上传文件:{content}");
|
||||
@@ -73,7 +74,6 @@ namespace Infrastructure.Middleware
|
||||
else
|
||||
{
|
||||
var sr = new StreamReader(request.Body, Encoding.UTF8);
|
||||
//string content = sr.ReadToEnd(); //.Net Core 3.0 默认不再支持
|
||||
var content = sr.ReadToEndAsync().Result;
|
||||
logData.Add("request.body", content);
|
||||
request.Body.Position = 0;
|
||||
|
||||
Reference in New Issue
Block a user