我正在尝试清空 plupload 队列,但它不起作用。我检查了一些 SO 问题并遵循了它们,但没有一个对我有用。难道我做错了什么?
// 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();
});