From 1c64f1252df478c60a50f0cf8700a2de2d48632e Mon Sep 17 00:00:00 2001 From: "283591387@qq.com" Date: Thu, 13 Apr 2023 23:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=A4=A7=E5=B0=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .Net6版本/VOL.WebApi/Startup.cs | 7 ++++++- Vue.Net/VOL.WebApi/Startup.cs | 6 +++++- å¼€å�‘版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Startup.cs | 7 ++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.Net6版本/VOL.WebApi/Startup.cs b/.Net6版本/VOL.WebApi/Startup.cs index ff37f9ca..48b14581 100644 --- a/.Net6版本/VOL.WebApi/Startup.cs +++ b/.Net6版本/VOL.WebApi/Startup.cs @@ -177,6 +177,7 @@ namespace VOL.WebApi Services.AddSingleton(); Services.AddSingleton(); + //设置文件上传大å°�é™�制 //设置文件上传大å°�é™�制 services.Configure(x => { @@ -184,7 +185,11 @@ namespace VOL.WebApi }); services.Configure(options => { - options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100< + options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M + }); + services.Configure(options => + { + options.MaxRequestBodySize = 1024 * 1024 * 100;//100M }); } public void ConfigureContainer(ContainerBuilder builder) diff --git a/Vue.Net/VOL.WebApi/Startup.cs b/Vue.Net/VOL.WebApi/Startup.cs index e70e7a57..03c2a8b2 100644 --- a/Vue.Net/VOL.WebApi/Startup.cs +++ b/Vue.Net/VOL.WebApi/Startup.cs @@ -185,7 +185,11 @@ namespace VOL.WebApi }); services.Configure(options => { - options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100< + options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M + }); + services.Configure(options => + { + options.MaxRequestBodySize = 1024 * 1024 * 100;//100M }); } diff --git a/å¼€å�‘版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Startup.cs b/å¼€å�‘版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Startup.cs index ee58031a..7c1f68a6 100644 --- a/å¼€å�‘版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Startup.cs +++ b/å¼€å�‘版dev/Vue.NetCore/Vue.Net/VOL.WebApi/Startup.cs @@ -175,6 +175,7 @@ namespace VOL.WebApi Services.AddSingleton(); + //ÉèÖÃÎļþÉÏ´«´óСÏÞÖÆ //ÉèÖÃÎļþÉÏ´«´óСÏÞÖÆ services.Configure(x => { @@ -182,7 +183,11 @@ namespace VOL.WebApi }); services.Configure(options => { - options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100< + options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M + }); + services.Configure(options => + { + options.MaxRequestBodySize = 1024 * 1024 * 100;//100M }); } public void ConfigureContainer(ContainerBuilder builder)