Hi
I'm using the async uploader, and I'm executing this function on the 'upload' event of the Kendo UI Upload widget. The function validates the file size for a single file. I'm displaying a custom div to present the error message when the file size exceeds the specified limit, and I want to also display the k-warning icon, but at the point when I execute the function, no DOM element has been added for the k-upload-status. Is my only option to manually create an element with a class of .k-warning? It feels like the right way to do this is to somehow trigger the k-upload-status - can I do that?
function onUpload(e) {
$("#logoUploadErrorMessage").hide();
$(".k-icon.k-warning").hide();
var files = e.files;
if (files[0].size > 4 * 1024 * 1024) {
$(".k-icon.k-warning").show();
$("#logoUploadErrorMessage").text("Max logo size 4mb");
$("#logoUploadErrorMessage").show();
e.preventDefault(); // This cancels the upload for the file
}
}