Hi,
at the OnUpload event I call a Javasrcipt to do some stuff before uploading. I generate a random string and set it as classname to the upload element to identify it in Javascript. In Javascript:
var files = $('. + uploaderClass)[0].querySelector('input').files;
this works in Firefox but not in Chrome (official version, I installed today).
So I set an pure HTML FileInput below the TelerikUpload like:
<input type="file" id="testFileUpload" />
(I choose first in the testFileUpload a file, then in the TelerikUpload which fires my Javascript)
I logged both elements to the browser console:
var telerikUploadElement = $('.' + uploadClass)[0].querySelector('input');
var testInput = document.querySelector('#testFileUpload');
console.log(telerikUploadElement);
console.log(testInput);
The console output for the telerikUploadElement:
input
.....
- files: FileList { length:0}
....
the console ouptut for the testInput:
input#testFileUpload .... - files: FileList {0: File, length: 1} ......
In Firefox, the console output is the same for both upload elements.
Tested on:
- Windows10
- Telerik.UI.for.Blazor 3.2.0
- .net6.0
- Google Chrome 100.0.4896.127
- Firefox 99.0.1