You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace POSV.HttpRequest
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Http连接操作帮助类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class HttpHelper
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 提供文件上传的信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class NamedFileStream
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 文件名称
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string FileName { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 文件上传字段 类似 input name='field'
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 字节
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Stream Stream { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 参数构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="name">field</param>
|
|
|
|
|
/// <param name="filename">文件名称</param>
|
|
|
|
|
/// <param name="stream">文件流</param>
|
|
|
|
|
public NamedFileStream(string name, string filename, Stream stream) {
|
|
|
|
|
Name = name;
|
|
|
|
|
FileName = filename;
|
|
|
|
|
Stream = stream;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|