• 配置代码

    • 1
      2
      3
      4
      5
      6
      services.Configure<ApiBehaviorOptions>(options =>
      {
      options.SuppressConsumesConstraintForFormFileParameters = true;
      options.SuppressInferBindingSourcesForParameters = true;
      options.SuppressModelStateInvalidFilter = true;
      });