Any way to know how many files have been added

2 posts, 0 answers
  1. Jay
    Jay avatar
    59 posts
    Member since:
    Dec 2011

    Posted 17 May 2013 Link to this post

    I am using manual upload, so have a button to initiate the upload. However, prior to uploading, I need to verify a set number of files have been selected for upload. So far this seems to work
    var upload = $find('<%= radAsyncUpload.ClientID %>');
    if ( upload._fileInput.files.length != required ) {
        $(".filesRequiredMessage").show();
    }
    but is delving into the internals of the control. Is there an approved method? getUploadedFiles() doesn't work, as the files haven't been uploaded yet.
  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 22 May 2013 Link to this post

    Hi Jay,

    RadAsyncUpload does not have an API which could be used to determine how many files are selected for upload. You could use the approach implemented in the attached project.


    Regards,
    Peter Filipov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top