zoukankan      html  css  js  c++  java
  • (UEditor 1.4.3.1 WebUploader 0.1.2 不支持Md5 ) 或 (UEditor 更新 WebUploader后 上传按钮失效) 或 (WebUploader inited 状态)

    本人使用UEditor时候需要对上传的文件进行MD5计算,但是UEditor1.4.3.1版本所带的WebUploader是0.1.2版本的不支持md5File接口,故直接将UEditor下的WebUploader直接更新为了0.1.5版本的(UEditor/dialoags/third-party/webuploader 替换为最新的就行了),但是问题出现了,添加文件后,上传按钮失效了。查找了一下是WebUploader接口更新了,导致/dialogs/image/image.js里对文件计数时错误。

    计数的地方如下

            getQueueCount: function () {
                var file, i, status, readyFile = 0, files = this.uploader.getFiles();
                for (i = 0; file = files[i++]; ) {
                    status = file.getStatus();
                    if ( status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
                }
                return readyFile;
            },

    改为

            getQueueCount: function () {
                var file, i, status, readyFile = 0, files = this.uploader.getFiles();
                for (i = 0; file = files[i++]; ) {
                    status = file.getStatus();
                    if (status == 'inited' || status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
                }
                return readyFile;
            },

    即可

  • 相关阅读:
    Qt的网络通信(以一对一聊天室为例)
    C/C++中的const ,static
    Qt的认识与相关问题的解决
    Qt的简单介绍,发展和由来
    STL模板的基础与了解
    malloc与new,C++中的指针与引用,C++struct与class的区别
    Qt的常用控件及控件的使用
    Qt的环境与工具、信号与槽
    学习Qt前你需要知道的
    模板与STL小结--vector、list、map等各类容器
  • 原文地址:https://www.cnblogs.com/Excelsior/p/4936730.html
Copyright © 2011-2022 走看看