To increase the default maximum from 128mb to 500mb:
- To apply across all endpoints (in Startup.cs)
services.Configure<FormOptions>(options =>
{
options.MultipartBodyLengthLimit = 524288000;
});
- To only apply to a specific endpoint (in a controller)
[RequestFormLimits(MultipartBodyLengthLimit = 524288000)]