title: How to save uploaded file using IFormFile in ASP.NET 5 RC1 MVC
body: <p>I'm using ASP.NET 5 RC with Visual Studio 2015.</p>
  
  <p>I have a ViewModel defined:</p>
  
  <pre><code>public class TeamVM
  {
      public IFormFile UploadedLogo { get; set; }
  }
  </code></pre>
  
  <p>and a controller:</p>
  
  <pre><code>[HttpPost]
  public IActionResult Create(TeamVM vm)
  {
       vm.UploadedLogo.SaveAs("filename.txt"); // Problem here - There is no SaveAs method
       return View();
  }
  </code></pre>
  
  <p>The problem is that intellisense shows that there is no <code>SaveAs()</code> method. I found out <a href="https://github.com/aspnet/httpabstractions/blob/master/src/Microsoft.AspNet.Http.Abstractions/IFormFile.cs" rel="nofollow">here</a> that this interface actually does not have a <code>SaveAs()</code> method.</p>
  
  <p>Also, I realized that if I change <code>IFormFile</code> to <code>ICollection&lt;IFormFile&gt;</code> and loop through, the collection the <code>IFormFile</code> instances will have the <code>SaveAs()</code> method defined.</p>
  
  <p>In my case <strong>I want to use <code>IFormFile</code> instead of <code>ICollection&lt;IFormFile&gt;</code></strong>. </p>
  
  <p><strong>How would be the correct way to save file to system using <code>IFormFile</code>?</strong></p>