Reputation: 185
I tried the below code by changing upload limit of 100 MB and tried uploading 50 MB file and still get error 413 Payload too large and after that i tried to follow steps of adding attribute to the controller but didn't work. Can you please let me know how i can achieve it.
Webconfig:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="100288000" />
</requestFiltering>
</security>
</system.webServer>
Code:
[HttpPost]
[Route("")]
[ProducesResponseType(typeof(ResponseModel), 200)]
[ValidateHeaders]
[RequestSizeLimit(100288000)]
public async Task<IActionResult> Submit([FromBody] Formdata formdata)
{
}
Upvotes: 0
Views: 21