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

Check if Upload is currently uploading file(s)

1 Answer 174 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Einar
Top achievements
Rank 1
Einar asked on 26 Oct 2015, 06:13 PM

I know there's an upload progress event that you can subscribe to, but I'm not looking for the specific progress of any given file, I just want to know if the Upload is busy uploading, something like myUploader.IsUploading(). 

I can definitely keep track of a counter and increment it on the upload event and decrement it in the success event and finally check if that number is 0, but it seems prone to error. Is there an easier way to ask the uploader if it's currently uploading or it has files waiting to be uploaded?

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 27 Oct 2015, 12:48 PM

Hello Einar,

There is no such built in method in the Upload widget API. Nevertheless when there is a file uploading, it's list item in the files list has the k-file-progress CSS class. You could use jQuery and check if there is an element containing this class in order to determine if a file is currently uploading.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Upload
Asked by
Einar
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or