我简单修改了js和样式,效果如下
使用起来也是超简单,将文件下载并解压到你网站目录下,然后
1、在使用位置插入代码
=============================
<iframe width="450px" src="/uploadify/upload.html?参数" frameborder="no" border="0" marginwidth="0"
marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
=============================
2、设置参数
uploader:接收上传文件的页面地址,经过Url编码,必须参数
fileTypeExts :文件类型,默认【*.*】
fileTypeDesc :文件类型描述,默认【所有文件】
multi :是否多选,默认【true】
3、接收文件(可参考upload.ashx)
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Charset = "utf-8";
HttpPostedFile file = context.Request.Files["Filedata"];
if (file != null)
{
file.SaveAs(uploadPath + file.FileName);
......
}
}
4、文件大小
默认上传最大文件为100M,当然这需要您web.config已经设置好的
使用如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<iframe width="450px" src="/uploadify/upload.html?参数" frameborder="no" border="0" marginwidth="0"
marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
</body>
</html>