I am trying to post large file to azure functions which is written in visualstudio Code platform. when i tried to upload less than 28Mb, it was successful. beyond that i am getting exception Microsoft.AspNetCore.Server.Kestrel.Core: Request body too large. Tried using RequestSizeLimit, DisableRequestSizeLimit attributes, but no use. Following is the code written in VS code
public static async Task Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequestMessage req)
{
var provider = new MultipartMemoryStreamProvider();
await req.Content.ReadAsMultipartAsync(provider);
var file = provider.Contents.First();
var fileInfo = file.Headers.ContentDisposition;
var fileData = await file.ReadAsByteArrayAsync();
}
And i am calling above function from angular6. I tried looking into the following doc and unable to implement in azure function [https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.server.kestrel.kestrelserverlimits?view=aspnetcore-1.1][KestrelServerLimits Class] Please let me know if there is direct setting to allow large data or any other work around. Thanks in advance.