Esempio n. 1
0
        /// <summary>
        /// 在请求中添加要上传的文件
        /// </summary>
        /// <param name="data">要上传的文件内容</param>
        /// <param name="fileName">文件名</param>
        /// <param name="fieldName">文件字段的名称(相当于&lt;input type=file name=fieldName&gt;)里的fieldName)</param>
        public void AttachFile(byte[] data, string fileName, string fieldName)
        {
            HttpUploadingFile file = new HttpUploadingFile(data, fileName, fieldName);

            files.Add(file);
        }
 /// <summary>
 /// 在请求中添加要上传的文件
 /// </summary>
 /// <param name="data">要上传的文件内容</param>
 /// <param name="fileName">文件名</param>
 /// <param name="fieldName">文件字段的名称(相当于&lt;input type=file name=fieldName&gt;)里的fieldName)</param>
 public void AttachFile(byte[] data, string fileName, string fieldName)
 {
     HttpUploadingFile file = new HttpUploadingFile(data, fileName, fieldName);
     files.Add(file);
 }