日期:2014-05-17  浏览次数:20449 次

swfupload的用法
点击添加附件的时候能把附件上传到本地文件夹,但是我点击按钮提交表单的时候,后台处理程序获文件为0,
  HttpPostedFile file;
            for (int i = 0; i < context.Request.Files.Count; ++i)
            {
                file = context.Request.Files[i];
                if (file == null || file.ContentLength == 0 || string.IsNullOrEmpty(file.FileName)) continue;
                string filepath = HttpContext.Current.Server.MapPath("file/" + Path.GetFileName(file.FileName));
                context.Response.Write(filepath);
                          }
swfupload的用法,请教一下高手,要如何才能获取文件上传数据库!

------解决方案--------------------
swfupload  使用的是flash上传的  而不是像html中的file控件  你可以使用swfupload的上传按钮上传文件到指定页面进行处理 表单提交时不会上传
------解决方案--------------------
swfupload post与 html post在处理上没有什么两样

 HttpPostedFile imgFile = context.Request.Files[j];
 imgFile.SaveAs(filePath);