.Net Core file upload size limit abnormal

.Net Core will encounter when receiving upload this exception: Multipart body length limit 16384 exceeded

According to the online method of how attempts had no effect, we found the back Request.Form interface functions can not be used directly, but the Form into the argument. which is:

a JsonResult UploadVersion public () 
{ 
    // used herein the property directly abnormal 
    // the Request.Form   
}
// parameters passed by the 
public a JsonResult UploadVersion ([FromForm] IFormCollection formData) 
{ 
    // here directly formData 
}

  

Guess you like

Origin www.cnblogs.com/Farmer-D/p/11652241.html