Category / Section
How to retrieve the selected file details from "FileSelect" event arguments in UploadBox?
1 min read
The FileSelect event is triggered when the file is selected for upload successfully. In that event argument, you can get the selected file details of the UploadBox control. You have to declare the FileSelect event of the UploadBox as illustrated in the following code example.
CSHTML
@Html.EJ().Uploadbox("UploadEvents").ClientSideEvents(e => e.FileSelect("fileselect"))
JavaScript
<script> function fileselect(arg) { console.log(arg[0]); } </script>
From the above code arg [0], you can get the following file details.
Name | Type | Description | |||||||||||||||
argument | Object | Event parameters in arg[0]
Other parameters in the argument:
| |||||||||||||||