|
@@ -4,6 +4,7 @@ using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
+using Microsoft.AspNetCore.Http.Features;
|
|
using Microsoft.AspNetCore.HttpsPolicy;
|
|
using Microsoft.AspNetCore.HttpsPolicy;
|
|
using Microsoft.AspNetCore.SpaServices;
|
|
using Microsoft.AspNetCore.SpaServices;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Configuration;
|
|
@@ -39,6 +40,13 @@ namespace HTEXMarkWeb
|
|
.AllowAnyMethod();
|
|
.AllowAnyMethod();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ //解决文件上传Multipart body length limit 134217728 exceeded
|
|
|
|
+ services.Configure<FormOptions>(x =>
|
|
|
|
+ {
|
|
|
|
+ x.ValueLengthLimit = int.MaxValue;
|
|
|
|
+ x.MultipartBodyLengthLimit = int.MaxValue;
|
|
|
|
+ x.MemoryBufferThreshold = int.MaxValue;
|
|
|
|
+ });
|
|
services.AddControllersWithViews();
|
|
services.AddControllersWithViews();
|
|
}
|
|
}
|
|
|
|
|