首页 > 其他 > 详细

解决百度UEditor列出图片列出文件时返回的文件路径为磁盘绝对路径的问题

时间:2019-05-23 17:10:14      阅读:254      评论:0      收藏:0      [点我收藏+]

 

替换绝对路径为空

 String str = new ActionEnter(request, buffer.toString(), "config.json").exec();
        String action = request.getParameter("action");
        String rootPath =buffer.toString();
        if( action!=null && (action.equals("listfile") || action.equals("listimage") ) ){
            rootPath = rootPath.replace("\\", "/");
            rootPath = rootPath.replace("//", "/");
            str = str.replaceAll(rootPath, "");
        }
        JSONObject json =JSONObject.parseObject(str);

 

解决百度UEditor列出图片列出文件时返回的文件路径为磁盘绝对路径的问题

原文:https://www.cnblogs.com/Leechg/p/10912847.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!