Check if Upload is currently uploading file(s)

2 posts, 1 answers
  1. Einar
    Einar avatar
    19 posts
    Member since:
    Jul 2014

    Posted 26 Oct 2015 Link to this post

    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?



  2. Answer
    Dimiter Madjarov
    Dimiter Madjarov avatar
    2312 posts

    Posted 27 Oct 2015 Link to this post

    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.

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top