我的茶k确实遇到了一个奇怪的问题。我无法上传超过茶est的MaxRequestBodySize的多个文件。
The expected behaviour is to throw the BadHttpRequestException when I am trying to reader this.Request.Form.Files.GetFiles(). I do expect to recieve request to controller action only once.
What is happening is that the upload action is hit a few time and browser with message "conection lost". I did not find a patter on how mamy times the action is called.
Controller action:
[HttpPost("upload")]
public IActionResult Upload()
{
try
{
var files = this.Request.Form.Files.GetFiles("files");
files.Select(async file => await this.SaveFile(file))
return …Run Code Online (Sandbox Code Playgroud)