public bool IsValidForFile(ManagedFile file)
 {
     return(file.IsTextFile() ||
            file.IsImageFile() ||
            file.Name.ToLower().EndsWith(".pdf") ||
            file.Name.ToLower().EndsWith(".rtf"));
 }