Skip to content

Commit

Permalink
Merge pull request #1345 from solliancenet/jdh-update-release-0.8.0-u…
Browse files Browse the repository at this point in the history
…pload-size

(0.8.0) Increase file upload size limit to 512 MB
  • Loading branch information
ciprianjichici authored Aug 2, 2024
2 parents b7867d3 + 2924a3f commit b527ea8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/dotnet/CoreAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using FoundationaLLM.Core.Interfaces;
using FoundationaLLM.Core.Models.Configuration;
using FoundationaLLM.Core.Services;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Azure.Cosmos;
using Microsoft.Azure.Cosmos.Fluent;
using Microsoft.Extensions.Options;
Expand Down Expand Up @@ -136,6 +137,16 @@ public static void Main(string[] args)
AppConfigurationKeys.FoundationaLLM_APIEndpoints_CoreAPI_Essentials_AppInsightsConnectionString,
ServiceNames.CoreAPI);

// Increase request size limit to 512 MB.
builder.WebHost.ConfigureKestrel(serverOptions =>
{
serverOptions.Limits.MaxRequestBodySize = 536870912; // 512 MB
});
builder.Services.Configure<FormOptions>(options =>
{
options.MultipartBodyLengthLimit = 536870912; // 512 MB
});

builder.Services.AddControllers();

builder.Services.AddProblemDetails();
Expand Down
11 changes: 11 additions & 0 deletions src/dotnet/ManagementAPI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using FoundationaLLM.Management.Models.Configuration;
using FoundationaLLM.Vectorization.Interfaces;
using FoundationaLLM.Vectorization.Services.RequestProcessors;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
Expand Down Expand Up @@ -127,6 +128,16 @@ public static void Main(string[] args)
AppConfigurationKeys.FoundationaLLM_APIEndpoints_ManagementAPI_Essentials_AppInsightsConnectionString,
ServiceNames.ManagementAPI);

// Increase request size limit to 512 MB.
builder.WebHost.ConfigureKestrel(serverOptions =>
{
serverOptions.Limits.MaxRequestBodySize = 536870912; // 512 MB
});
builder.Services.Configure<FormOptions>(options =>
{
options.MultipartBodyLengthLimit = 536870912; // 512 MB
});

builder.Services.AddControllers();
builder.Services.AddProblemDetails();
builder.Services
Expand Down

0 comments on commit b527ea8

Please sign in to comment.