From c202c46962b5aa3c47c94f04ad8dfef81b83188c Mon Sep 17 00:00:00 2001 From: Maciej Zagozda Date: Wed, 16 Jul 2025 13:01:45 +0200 Subject: [PATCH 1/3] Increased upload limit to 100M --- appsettings.json | 2 +- sample-web.config | 75 +++++++++++++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/appsettings.json b/appsettings.json index efef553..6ccc043 100644 --- a/appsettings.json +++ b/appsettings.json @@ -9,7 +9,7 @@ "AdobeAPIToken": "", "TemplatePath": "template.html", "TemplateScriptPath": "templateScript.html", - "MaxFileSizeInBytes": 26214400, + "MaxFileSizeInBytes": 104857600, "AllowedHosts": "*", "SeqServer": "" } diff --git a/sample-web.config b/sample-web.config index ecad5b3..825960c 100644 --- a/sample-web.config +++ b/sample-web.config @@ -1,30 +1,55 @@ - - - - - + + + + + + - - - - - + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From b7ba2e888258b81d7e8078d60d2fb6da4ae65cbc Mon Sep 17 00:00:00 2001 From: Patryk Nowak Date: Thu, 17 Jul 2025 15:39:08 +0200 Subject: [PATCH 2/3] Additional config for iis express usage Might be helpful for local testing. The sample is good for a normal iis --- iisexpress-web.config | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 iisexpress-web.config diff --git a/iisexpress-web.config b/iisexpress-web.config new file mode 100644 index 0000000..0423ad7 --- /dev/null +++ b/iisexpress-web.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + From 7f3cdb3656b7f41b34fe5aedf9f48fec5475d207 Mon Sep 17 00:00:00 2001 From: Maciej Zagozda Date: Sun, 18 Jan 2026 14:40:02 +0100 Subject: [PATCH 3/3] Increased upload limit to 100M --- Program.cs | 7 +++++++ Services/SharingService.cs | 2 ++ 2 files changed, 9 insertions(+) diff --git a/Program.cs b/Program.cs index 74aa8d1..ca13cd0 100644 --- a/Program.cs +++ b/Program.cs @@ -1,4 +1,5 @@ using Infostacker.Services; +using Microsoft.AspNetCore.Http.Features; using Microsoft.Extensions.DependencyInjection.Extensions; using Serilog; using Serilog.Core; @@ -34,6 +35,12 @@ .AllowAnyMethod(); }); }); + +builder.Services.Configure(options => +{ + options.MultipartBodyLengthLimit = 104857600; // 100MB +}); + builder.Services.AddTransient(); builder.Services.TryAddSingleton(); builder.Logging.ClearProviders(); diff --git a/Services/SharingService.cs b/Services/SharingService.cs index cfbd9dd..5d19cb8 100644 --- a/Services/SharingService.cs +++ b/Services/SharingService.cs @@ -27,6 +27,8 @@ public SharingService(ILogger logger, IConfiguration configurati TemplateScriptPath = _configuration.GetSection("TemplateScriptPath").Value ?? string.Empty; BuildVersion = _configuration.GetSection("version").Value ?? string.Empty; MaxFileSize = int.Parse(_configuration.GetSection("MaxFileSizeInBytes").Value); + + } public async Task UploadMarkdownWithFiles(string markdown, List files)