program 添加
builder.Services.Configure<FormOptions>(x => {
x.ValueLengthLimit = int.MaxValue;
x.MultipartBodyLengthLimit = int.MaxValue;
});
iis web.config在system.service添加如下代码
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="322122547" /><!-- 3GB-->
</requestFiltering>
</security>