This question is locked. New answers and comments are not allowed.
Hi,
I am using upload control for MVC, the problem that i am facing is while using clientevents OnUpload. Below is the sample code that i am using:
Here in OnUpload function, i am not getting file.extension(shown in bold). Also i am not getting file.size..
Please help me out with this if any one have a solution.
Regards,
Dhaval Shukla
I am using upload control for MVC, the problem that i am facing is while using clientevents OnUpload. Below is the sample code that i am using:
<% Html.Telerik().Upload().Name("uploadedfile") _ .Multiple(True) _ .Async(Sub(upl) upl.Save("Save", "Client") _ .AutoUpload(False) _ .Remove("Remove", "Client") End Sub) _ .ClientEvents(Function(cl) cl.OnUpload("OnUpload")) _ .Enable(True).Render() %>function OnUpload(e) { // Array with information about the uploaded files var files = e.files; // Check the extension of each file and abort the upload if it is not .jpg $.each(files, function (file) { if (file.extension != ".jpg") { alert(file.extension); alert("Only .jpg files can be uploaded") e.preventDefault(); return false; } }); }Here in OnUpload function, i am not getting file.extension(shown in bold). Also i am not getting file.size..
Please help me out with this if any one have a solution.
Regards,
Dhaval Shukla