您好,欢迎访问一九零五行业门户网

Jquery Uploadify上传带进度条的简单实例_jquery

复制代码 代码如下:
jquery uploadify上传带进度条
上传|
        取消上传
复制代码 代码如下:
using system;
using system.web;
using system.io;
public class uploadhandler : ihttphandler
{
    public void processrequest(httpcontext context)
    {
        context.response.contenttype = text/plain;
        context.response.charset = utf-8;
        httppostedfile file = context.request.files[filedata];
        string uploadpath = httpcontext.current.server.mappath(@context.request[folder]);
        if (file != null)
        {
            if (!directory.exists(uploadpath))
            {
                directory.createdirectory(uploadpath);
            }
            file.saveas(path.combine(uploadpath, file.filename));
            context.response.write(1);
        }
        else
        {
            context.response.write(0);
        }
    }
    public bool isreusable
    {
        get
        {
            return false;
        }
    }
}
其它类似信息

推荐信息