【发布时间】:2012-09-22 04:49:40
【问题描述】:
一位同事向我展示了一些他们在 ASP.NET Web Api 中处理上传文件的代码。是这样的:
Task<IEnumerable<HttpContent>> task = Request.Content.ReadAsMultipartAsync(provider);
return task.ContinueWith<HttpResponseMessage>(contents =>
{
//Do stuff...
}
异步读取文件有什么好处?
【问题讨论】:
标签: c# asp.net-mvc asynchronous asp.net-web-api