diff --git a/src/Umbraco.Web.Common/Security/ConfigureFormOptions.cs b/src/Umbraco.Web.Common/Security/ConfigureFormOptions.cs index 938830d5e3dc..08e58347837c 100644 --- a/src/Umbraco.Web.Common/Security/ConfigureFormOptions.cs +++ b/src/Umbraco.Web.Common/Security/ConfigureFormOptions.cs @@ -14,6 +14,6 @@ public void Configure(FormOptions options) => // convert from KB to bytes options.MultipartBodyLengthLimit = _runtimeSettings.Value.MaxRequestLength.HasValue - ? _runtimeSettings.Value.MaxRequestLength.Value * 1024 + ? (long)_runtimeSettings.Value.MaxRequestLength.Value * 1024 : long.MaxValue; } diff --git a/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs b/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs index f388be0391c2..cd40331720db 100644 --- a/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs +++ b/src/Umbraco.Web.Common/Security/ConfigureKestrelServerOptions.cs @@ -15,6 +15,6 @@ public void Configure(KestrelServerOptions options) => // convert from KB to bytes, 52428800 bytes (50 MB) is the same as in the IIS settings options.Limits.MaxRequestBodySize = _runtimeSettings.Value.MaxRequestLength.HasValue - ? _runtimeSettings.Value.MaxRequestLength.Value * 1024 + ? (long)_runtimeSettings.Value.MaxRequestLength.Value * 1024 : 52428800; }