I'm using Kendo v 2023.2.606 from the Kendo CDN.
In my view I have the following code:
<div class="row row-cols-lg-auto gx-3 gy-2 align-items-baseline mt-2">
<div class="col">
<h4>Choose File</h4>
<!-- upload a file -->
@(Html.Kendo().Upload()
.Name("files")
.Multiple(false)
.ShowFileList(false)
.Async(_ => _
.Save("SubmitFile", "DataImport", new { Area = "Admin" })
.Batch(true)
.AutoUpload(true)
)
.Events(_ => _
.Upload("onUpload")
.Success("onUploadSuccess")
.Error("onUploadFail")
)
.Validation(_ => _
.AllowedExtensions(new string[] { "xls", "xlsx", "csv" })
.MaxFileSize(3145728)
)
)
</div>
</div>
If I select a file with an extension that is not listed, e.g. .zip, or I select a file that is more than 3.14MB all I see is this:
It does not hit my MVC controller action (which is fine) but the only indication of a problem is the (!) icon. The icon is not clickable.
Why is it not displaying a message saying the file is not valid/too big?