2011-04-25 37 views
6

He una función que tiene un parámetro de tipo HttpPostedFileBase y yo estoy poniendo el nombre del archivo usando (Path.GetFileName):Cómo obtener el tamaño del archivo HttpPostedFileBase

public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments) 
     { 
      foreach (var file in attachments) 
      { 

       var fileName = Path.GetFileName(file.FileName); 
} 
} 

¿Cómo puedo obtener el ¿¿tamaño del archivo??

Respuesta

Cuestiones relacionadas