I have a Asp.net core 3.1 api and react typescript application.
When large file uploaded then i get exception this error
"Unexpected end of request content."
React component is Uppy.io and upload method is XHR
I use nginx for request receive
I tried below solutions
But not work
I tried 20mb file to slowing down the browser for determine the problem. It is work. In my opinion problem is not long upload time.
I tested on 110 mb file
Uppy.io component is progress 100 then waiting 30 second and throw exception
I solved to my problem.
I Added on below code on nginx location block.
It's Work
proxy_http_version 1.1;
proxy_set_header Connection keep-alive;
client_max_body_size 2000M;
proxy_request_buffering off;
proxy_send_timeout 1h;
proxy_read_timeout 1h;
Asp.net added to below code
services.Configure<FormOptions>(x =>
{
x.ValueLengthLimit = int.MaxValue;
x.MultipartBodyLengthLimit = int.MaxValue;
});