This is a migrated thread and some comments may be shown as answers.

Detect when uploading multiple files vs uploading single file

1 Answer 8 Views
FileManager
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Veteran
Carlos asked on 16 Apr 2021, 12:19 PM

     Is there a way to detect when multiple files were uploaded(via upload dialog or drag/drop) vs when a single file is uploaded?  We are trying to run different logic on the files depending on if it was multiple files or a single file that was uploaded.

 

Thanks,

-Carlos

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 21 Apr 2021, 08:54 AM

Hello, Carlos,

You can configure the Upload in the FileManager to enable the batch option, so that multiple files will be uploaded with a single request. Thus, in the upload event, you can check the length of the e.files object to see if you are uploading a single or multiple files.

Let me know how that works for you.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
FileManager
Asked by
Carlos
Top achievements
Rank 1
Veteran
Answers by
Martin
Telerik team
Share this question
or