I would like to increase the default upload size of 30MB in ASP.NET Core 2.0 web app. The proposed solutions like adding [RequestSizeLimit(4_100_000_000)] or adding
services.Configure<FormOptions>(x => x.MultipartBodyLengthLimit = 4074790400);
do not work in asp.net core 2.0. I guess those solutions are for .NET Core 1+ versions.
I also added this into Program.cs, which is also proposed solution:
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseKestrel(options =>
{
options.Limits.MaxRequestBodySize = 4120100000;
})
.Build();
Although locally - using Visual studio docker debugger, I am able to upload files greater than 30 MB, in AWS environment I am getting again 413 Request Entity Too Large error.