我让控件在页面加载时初始化,然后在按钮上单击它们,我想使用setOptions上传saveURL。问题是它永远不会打到onSuccess函数。
setOptions类是否缺少某些选项?
$("#UploadDocumentFile").click(function (event) {
var UploadDocumentFile = $("#UploadDocumentFile").data("kendoUpload");
UploadDocumentFile.setOptions({
async: {
saveUrl: "/Shared/Upload.ashx?Meetingid=" + MeetingId + "&Action=" + selectedDocType,
},
success: onSuccess,
multiple: false,
});
function onSuccess(e) {
if (e.operation == "upload") {
debugger;
console.log("%cSetting hfFileManagerId %s", 'color:green', e.response.resultStatus.ReturnId);
e.sender.options.async.removeUrl = "/Shared/DeleteFileUploaded.ashx?FileManagerId=" + e.response.resultStatus.ReturnId + "&Action=Agenda";
$("#hfFileManagerId").val(e.response.resultStatus.ReturnId);
}
}
}