在 Startup的ConfigureServices方法中添加:

services.Configure<ApiBehaviorOptions>(options =>
{
options.SuppressConsumesConstraintForFormFileParameters = true;
options.SuppressInferBindingSourcesForParameters = true;
options.SuppressModelStateInvalidFilter = true;
});

相关文章:

  • 2021-05-20
  • 2021-08-18
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2021-07-13
  • 2022-12-23
  • 2021-08-14
  • 2021-11-08
  • 2021-08-11
相关资源
相似解决方案