question 1:
listening method in plupload
FileUploaded
I am listening to the return parameters of file upload
received the same file from the background, and prompted to ask whether to overwrite
when I clicked to confirm the overwrite, I called the uploader.start (); method of plupload and found that this method did not call the upload interface
to ask. How should I upload the file again when I click to confirm the overwrite?
FileUploaded: function(up, file, info) { //
var resp = JSON.parse(info.response);
if(resp.code == "0000"){ //
layer.alert(resp.desc, {icon: 1,closeBtn:false}, function(){
plupload.each(file,function(file) {
puploader.removeFile(file);
});
document.getElementById("filelist").innerHTML = "";
brand_list("");
});
}else if(resp.code == "4999"){ // 4999 code
var repeat = layer.open({ //
type: 1,
title: "",
icon: 7,
closeBtn: false,
shade: 0,
content: "<div style="padding:15px;">"+file.name+"" + resp.desc + "</div>",
btn: ["", ""],
yes: function(index, layero) { //
var data;
data = {force: "true"};
puploader.setOption("multipart_params", data); //
puploader.start(); // ****
layer.close(repeat);
},
no: function(index, layero) {
layer.close(repeat);
}
});
return false;
}else{
layer.alert(resp.desc, {icon: 7});
}
}