좋아요. 업로드 대기열을 지우고 테스트 할 수있는 몇 가지 테스트 코드를 작성했지만 현재 위치에서 refresh() 함수에 액세스하는 방법을 모르겠습니다. jQuery UI 위젯을 기본으로 사용하고 있습니다. INIT를 사용하는 부분이 나에게 지옥을주고 있는데, 내 json 호출에서 refresh()하는 방법을 알아낼 수 없습니다. 분명히 jQuery를 빨아 들인 것처럼 나를 계몽 할 수 있기를 바랍니다.jQuery UI 위젯을 Plupload하고 대기열을 새로 고침
var do_continue = false;
$("#uploader").plupload({
// General settings
runtimes : 'html5,browserplus,silverlight,gears,html4',
url : CI.base_url + 'private/ad/upload_ad_images',
max_file_size : '2mb',
max_file_count: 5, // user can add no more then 20 files at a time
//chunk_size : '1mb',
unique_names : true,
multiple_queues : true,
// Resize images on clientside if we can
//resize : {width : 800, height : 600, quality : 90},
// Rename files by clicking on their titles
rename: true,
// Sort files
sortable: true,
// Specify what files to browse for
filters : [
{title : "Image files", extensions : "jpg,gif,png"}
],
// Flash settings
flash_swf_url : CI.base_url + 'scripts/plupload/js/plupload.flash.swf',
// Silverlight settings
silverlight_xap_url : CI.base_url + 'scripts/plupload/js/plupload.silverlight.xap',
// Post init events, bound after the internal events
init : {
QueueChanged: function(up) {
// check for max photos here
$.getJSON(CI.base_url + 'private/ad_ajax/count_uploaded_images/', function(data) {
if (!data.message) {
alert("no data found? - please contact us with this message.");
do_continue = false;
}else if(data.message != "go") {
alert("Maximum photo uploads reached.");
do_continue = false;
}
if (!do_continue) {
$(this).refresh(); // -->> need something that works here
}
});
}
}
});
'uploader.splice();'는 대기열을 지우기에 충분합니다 .. 어쩌면 jquery.ui 또는 플래시 플러그인을 사용하여 나중에 새로 고침해야합니다. – ppumkin