mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-26 03:39:49 +08:00
增加后台文件上传大小配置
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user