本文转载自:http://www.cnblogs.com/zj1111184556/p/3494502.html public class FileUploadController : ApiController { public async Task<HttpResponseMessage> Post() { // 检查是否是 multipart/form-data if (!Request.Content.IsMimeMultipartContent("form-data&quo
本文转载自:http://www.cnblogs.com/zj1111184556/p/3494502.html public class FileUploadController : ApiController { public async Task<HttpResponseMessage> Post() { // 检查是否是 multipart/form-data if (!Request.Content.IsMimeMultipartContent("form-data&quo
上传文件通过webApi html端调用时包含(form提交包含 enctype="multipart/form-data",才可以启作用获取到文件) public class UploadController : ApiController{ public async Task<HttpResponseMessage> PostFile() { // Check if the request contains multipart/form-data. if (!Reque