How to set up a Web API controller for multipart/form-data

前端 未结 8 2116
萌比男神i
萌比男神i 2020-11-27 02:51

I am trying to figure this out. I was not getting any useful error messages with my code so I used something else to generate something. I have attached that code after the

8条回答
  •  有刺的猬
    2020-11-27 03:50

    check ur WebApiConfig and add this

    GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
    

提交回复
热议问题