New to Telerik UI for ASP.NET MVC? Download free 30-day trial

File Identification

The internal implementation of the Upload widget allows you to identify which is the file object which is in the process of uploading to the remote endpoint.

Regardless of the mode of operation, the Upload generates a unique identifier (uid) for each file. When the Upload is in a synchronous or asynchronous mode with its batch option enabled, the single uid that is generated stands for the whole batch of files which were selected at the same time. If the Upload is in an asynchronous mode with its batch option disabled, the Upload generates a uid for each separate file.

The generated uid is added as a property of the e.files collection to all of the following events:

  • cancel
  • error
  • progress
  • remove
  • select
  • upload
        .Async(a => a
            .Save("Save", "Upload")
            .Remove("Remove", "Upload")
        .Events(events => events

    <script type="text/javascript">
        function onSelect(e) {
            console.log("Selected files uids :: [ " + getFileInfo(e) + " ]");

        function getFileInfo(e) {
            return $.map(e.files, function(file) {
                var info = file.uid;

                return info;
            }).join(", ");

See Also

In this article