如何在web api中將文件的一部分讀取爲流並對此流執行操作而不將整個文件存儲在內存中?注意:我不想在閱讀之前將文件保存到任何地方 - 它會上傳到web api控制器。 但我真正想爲實現以下僞代碼: foreach file in Request
{
using (var sr = new StreamReader(fileStream))
{
string fi
您好,我需要更改BadRequest()返回響應消息的人。 當我使用這樣的要求,BadResquest("error: you can not pass these values") 我想我的API返回是這樣的: {"error: you can not pass these values"}
但端點重新調整如下: {"Message":"error: you can not pass the