KE--上传图片

1.修改KE-plugins的images.js 文件 

  uploadJson = K.undef(self.uploadJson, self.basePath + 'asp.net/upload_json.ashx'),
        imgPath = self.basePath + 'plugins/image/images/',

2.修改图片上传限制   

String aspxUrl = context.Request.Path.Substring(0, context.Request.Path.LastIndexOf("/") + 1);
       
        //文件保存目录路径
        String savePath = "../attached/";

        //文件保存目录URL
        String saveUrl = aspxUrl + "../attached/";

        //定义允许上传的文件扩展名
        Hashtable extTable = new Hashtable();
        //extTable.Add("image", "gif,jpg,jpeg,png,bmp");
        extTable.Add("image", "gif,jpg,png");
        extTable.Add("flash", "swf,flv");
        extTable.Add("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb");
        extTable.Add("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2");

 

uploadJson = K.undef(self.uploadJson, self.basePath + 'asp.net/upload_json.ashx'),
        imgPath = self.basePath + 'plugins/image/images/',

posted on 2012-02-13 17:22  水行者  阅读(192)  评论(0编辑  收藏  举报

导航