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

Any way to know how many files have been added

1 Answer 53 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Jay asked on 17 May 2013, 02:14 PM
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.

1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 22 May 2013, 08:00 AM
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.
Tags
AsyncUpload
Asked by
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Peter Filipov
Telerik team
Share this question
or