相关疑难解决方法(0)

kestler MaxRequestBodySize上传的文件超出限制

我的茶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)

.net kestrel-http-server asp.net-core

1
推荐指数
1
解决办法
1995
查看次数

标签 统计

.net ×1

asp.net-core ×1

kestrel-http-server ×1