jquery 如何清空plupload队列[已关闭]

2fjabf4q  于 2022-12-12  发布在  jQuery
关注(0)|答案(1)|浏览(126)

很难判断此处所问的问题。此问题不明确、含糊、不完整、过于宽泛或过于修辞,无法以当前形式合理地回答。若要获得澄清此问题以便重新打开的帮助,请visit the help center
9年前就关门了。
我试图清空plupload队列,但它不工作。我已经检查了一些问题,并遵循他们,但没有为我工作。我做错了什么吗?

// Convert divs to queue widgets when the DOM is ready
$(function () {
    $("#uploader").pluploadQueue({
        // General settings
        runtimes: 'flash,html5,silverlight,browserplus,gears,html4',
        url: '<%= Page.ResolveUrl("~")%>Memories/HandlerAlbumUploader.aspx',
        max_file_size: '10mb',
        chunk_size: '1mb',
        unique_names: true,
        multiple_queues: true,
        // Resize images on clientside if we can
        //resize: { width: 320, height: 240, quality: 90 },

        // Specify what files to browse for
        filters: [
        { title: "Image files", extensions: "jpg,gif,png" }
    ],

        // Flash settings
        flash_swf_url: '<%= Page.ResolveUrl("~")%>Memories/js/plupload.flash.swf',

        // Silverlight settings
        silverlight_xap_url: '<%= Page.ResolveUrl("~")%>Memories/js/plupload.silverlight.xap',

        init: { StateChanged: function (up) {
            // Called when the state of the queue is changed
            if (up.state == plupload.STOPPED) {
                $('#<%=btnSubmit.ClientID%>').removeAttr('disabled');

            }
        }
        }
    });

    var uploader = $('#uploader').plupload('getUploader');
    uploader.splice();
    uploader.refresh();
});
wtlkbnrh

wtlkbnrh1#

您可能想要做的是创建一个按钮或链接,当单击时将调用uploader.splice()
您还需要为QueueChanged事件(使用uploader.bind())创建一个回调函数,该事件将由您对splice()的调用触发。
阅读文档,所有信息都在那里:https://www.plupload.com/docs/v2/Uploader

相关问题