• 百度编辑器图片在线流量返回url改动


    百度编辑器中返回的是我们server中的url,有时并非我们须要的,比方图文编辑中。我想在线浏览上传过的图片 ,那么我返回的应该是腾讯server上面的url。这样才不会被腾讯的过滤器过来掉,全部我们就须要改动在线管理的图片获取路径详细操作例如以下:

    BaseState fileState = null;

    File file = null;
    String realpath= null;
    for ( Object obj : files ) {
    if ( obj == null ) {
    break;
    }
    file = (File)obj;
    fileState = new BaseState( true );
    realpath=  PathFormat.format( this.getPath( file ) );
    //fileState.putInfo( "url", PathFormat.format( this.getPath( file ) ) );
    //TODO  处理列出的图片信息
    String url=UploadToTX.urlSelect(realpath);
    fileState.putInfo( "url", url);

    state.addState( fileState );
    }

    return state;



    改动后的在线浏览还是浏览不出来,还须要改动对话框中的js文件。改动/ueditor/dialogs/image/image.js以下的js就能够了。不然会显示图片引用未授权。

                        //TODO
                        //img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
                        img.setAttribute('src', urlPrefix + list[i].url );



  • 相关阅读:
    [BZOJ3160]万径人踪灭
    [BZOJ5212][ZJOI2018]历史
    [BZOJ3563&3569]DZY Loves Chinese
    [HDU4336]Card Collector
    [HDU4652]Dice
    [POJ3683]Priest John's Busiest Day
    ISODateTimeFormat 转换2019-08-15T00:36:49.366456463Z 日期格式
    GoTTY-K8S-Docker 终端
    【php】PHP对redis操作详解
    【tool】VLC播放rtmp协议
  • 原文地址:https://www.cnblogs.com/jzssuanfa/p/7110862.html
Copyright © 2020-2023  润新知