One thing suggested in another thread here is adding this to your Startup.cs:
services.Configure<FormOptions>(x =>
{
x.MultipartBodyLengthLimit = 10737418240;
});
Another possibility (also from that thread) is setting the max size for kestrel:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel((context, options) =>
{
// Handle requests up to 50 MB
options.Limits.MaxRequestBodySize = 52428800;
})
.UseStartup<Startup>();
});
Hello everyone!