public static MultiPart CreateFile(string name, string fieldName, string contentType, byte[] content, byte[] eol, Encoding encoding = null) { var parameters = MultiPartParameters.CreateFile(name, fieldName, contentType, eol); var part = new MultiPart(parameters, eol, encoding); part.m_Content = content; return(part); }