王骏的博客
编程、网络技术点滴...

公告

逐渐将VC知识库的博客迁移到这里!

随笔分类

随笔档案

相册

最新评论

阅读排行榜

评论排行榜

程序员博客   首页  新随笔  订阅  管理  登录 
 
王骏的博客 阅读(1321) 评论(2)
源代码:http://blog.vckbase.com/Files/wangjun/BigFileUpload.rar

简明使用方法(详见Default.aspx.cs):
1)Web.config中<httpModules>添加
        <add name="BigFileUploadModuleHandle " type="HelpSoft.BigFileUploadModuleHandle,BigFileUploadHandle" />

2) 指定上传临时目录
UploadContext context = UploadContextFactory.InitUploadContext(this, @"e:\temp");

3)保存
UploadContext context = UploadContextFactory.GetUploadContext();
if ((context != null) && (context.Status == uploadStatus.Complete))
{
         //context.SaveFile(file1.ClientID, Request.MapPath("/myupload/"));
           context.SaveFile(file1.ClientID, @"e:\temp\upload\"); //后面必须有:"\"
}