?? multipartfileupload.cs
字號(hào):
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Specialized;
using System.Net;
using System.IO;
namespace Org.Carrot2
{
//
// This class based on an example from:
// http://blog.mindbridge.com/?p=59
//
// With modifications.
//
public class MultipartFileUpload
{
private Uri uri = null;
private NameValueCollection parameters = null;
private NameValueCollection formData = null;
private String fileDisplayName = null;
private String fileParameterName = null;
private String boundary;
private FileInfo file = null;
private NetworkCredential networkCredential = null;
private readonly int BUFFER_SIZE = 500;
public MultipartFileUpload()
{
parameters = new NameValueCollection();
formData = new NameValueCollection();
}
public MultipartFileUpload(Uri uri)
: this()
{
this.uri = uri;
}
#region getters and setters
/// <summary>
/// the destination of the multipart file upload
/// </summary>
public Uri Uri
{
get { return this.uri; }
set { this.uri = value; }
}
/// <summary>
/// the parameters to be passed along with the post method
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -