Myles J
Myles J

Reputation: 2880

Kendo UI Angular file upload component fails with large files

I am using the Kendo Angular File Upload component within my Angular 7 app. The back end is ASP.NET core 2.1 hosting a MVC API via Kestrel. I can get uploads to work for small files. Larger files (120MB) fail with a 500 (Internal Server Error). I have used the following DisableRequestSizeLimit attribute on my endpoint controller method:

[HttpPost, DisableRequestSizeLimit, Route("Upload")]
public async Task<IActionResult> Post(List<IFormFile> files)
{

Why would large file uploads still fail after using DisableRequestSizeLimit?

Upvotes: 1

Views: 634

Answers (1)

Myles J
Myles J

Reputation: 2880

For those of you having similar issues, I managed to resolve this by also adding the RequestFormLimits attribute e.g.

[HttpPost, DisableRequestSizeLimit, RequestFormLimits(MultipartBodyLengthLimit = Int32.MaxValue, ValueLengthLimit = Int32.MaxValue), Route("Upload")]

Hope this helps someone.

Upvotes: 1

Related Questions