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

替换绝对路径为空

 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);
原文地址:https://www.cnblogs.com/Leechg/p/10912847.html