title: How to get size of HttpPostedFileBase file
body: <p>I have a function that has a parameter of type <strong>HttpPostedFileBase</strong> and I'm getting the file's name using (Path.GetFileName):</p>
  
  <pre><code>public ActionResult Save(IEnumerable&lt;HttpPostedFileBase&gt; attachments)
         {
             foreach (var file in attachments)
             {
  
                 var fileName = Path.GetFileName(file.FileName);
  }
  }
  </code></pre>
  
  <p>How can I get the file size??</p>