增加后台文件上传大小配置

This commit is contained in:
283591387@qq.com
2023-04-13 23:29:50 +08:00
parent ec38ee2439
commit 1c64f1252d
3 changed files with 17 additions and 3 deletions
+6 -1
View File
@@ -177,6 +177,7 @@ namespace VOL.WebApi
Services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>();
Services.AddSingleton<Quartz.Spi.IJobFactory, IOCJobFactory>();
//设置文件上传大小限制
//设置文件上传大小限制
services.Configure<FormOptions>(x =>
{
@@ -184,7 +185,11 @@ namespace VOL.WebApi
});
services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100<
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
}
public void ConfigureContainer(ContainerBuilder builder)
+5 -1
View File
@@ -185,7 +185,11 @@ namespace VOL.WebApi
});
services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100<
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
}
@@ -175,6 +175,7 @@ namespace VOL.WebApi
Services.AddSingleton<Quartz.Spi.IJobFactory, IOCJobFactory>();
//设置文件上传大小限制
//设置文件上传大小限制
services.Configure<FormOptions>(x =>
{
@@ -182,7 +183,11 @@ namespace VOL.WebApi
});
services.Configure<KestrelServerOptions>(options =>
{
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100<
options.Limits.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodySize = 1024 * 1024 * 100;//100M
});
}
public void ConfigureContainer(ContainerBuilder builder)