当前位置: 代码迷 >> .NET面试 >> 1W分求解决一个有关问题
  详细解决方案

1W分求解决一个有关问题

热度:77   发布时间:2016-05-02 01:10:13.0
1W分求解决一个问题
1W分求解决一个问题
人格担保,如果我失言,以后我在csdn上的问题各位老师可以不用再帮我,谢谢!

因csdn不能上传附件,所以在这简单说明一下问题情况


帮我将uploadify上传控件修改为可以支持中文路径,
如谁愿意帮我,请加我QQ:100510037  电话:13684129589


------解决思路----------------------
看下这个试试
------解决思路----------------------
可以上传到下载区,然后把链接粘过来
------解决思路----------------------
只能提供相关例子,参考之:
http://zzk.cnblogs.com/s?w=blog%3Ainsus%20uploadify
------解决思路----------------------
100==1W嘛- -。

var _frmData="";
            $("#uploadify").uploadify({
                'script': '../a/b.aspx',
                'uploader': '../a/b.aspx?Method=upload',
                'folder': 'UploadFile',
                'queueID': 'fileQueue',
                'swf': '../Scripts/Uploadify/uploadify.swf',
                'buttonText': '选择文件',
                'fileTypeDesc': '描述文件类型',
                'fileTypeExts': '*.gif; *.jpg; *.png;',
                'fileSizeLimit': '2MB',
                'auto': true,
                'multi': true,
                'formData': _frmData,
                'onSelect': function (file) {
                    _frmData.name = "123";
                    _frmData.sex= "男";
                    $("#uploadify").uploadify("settings", "formData", { "name": "123", "sex": "男" });
                },
                'onUploadSuccess': function (file, data, response) {
                   //执行成功的函数
                }
            });



//接收文件函数---->b.aspx

#region
                        Response.ContentType = "text/plain";
                        Response.Charset = "utf-8";
                        HttpPostedFile file = Request.Files["Filedata"];
                        string name= Request["name"].ToString();
                        string sex= Request["sex"].ToString();
                        string uploadPath = HttpContext.Current.Server.MapPath("../../") + "拼接你的路径" + "//";
                        Response.Clear();
                        if (file != null)
                        {
                            if (!Directory.Exists(uploadPath))
                            {
                                Directory.CreateDirectory(uploadPath);
                            }
                            string filename = DateTime.Now.ToString("yyyyMMddhhmmss") + file.FileName.Substring(file.FileName.IndexOf("."));
                            file.SaveAs(uploadPath + filename);
                            //下面这句代码缺少的话,上传成功后上传队列的显示不会自动消失
                            Response.Write("返回你的相对路径“ + "/" + filename);
                            Response.End(); 
                        }
                        else
                        {
                            //context.Response.Write("0");
                        }
                        break;
                        #endregion


看看这种的行不。
------解决思路----------------------
看看这里http://www.cnblogs.com/CareySon/archive/2011/07/19/2110289.html 希望对您有所帮助
  相关解决方案