代码如下:
var sc = Request.Content;
using (MemoryStream tempStream = new MemoryStream())
{
sc.CopyToAsync(tempStream).Wait();
tempStream.Seek(0, SeekOrigin.Begin);
}