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

Select button is not visible after reaching MaxFileInputsCount

7 Answers 287 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Raji
Top achievements
Rank 1
Raji asked on 15 Feb 2012, 12:31 AM
I am using RadAsyncUpload and have set the property MaxFileInputsCount to 10. After browsing the 10 documents the "Select" button disappears. Which is fine. I then delete the 10th documents and still the "Select" button is not visible. I want to show the "Select" button when the total uploaded files is <10.

7 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 15 Feb 2012, 09:51 AM
Hello Raji,

I tried using a RadAsyncUpload, set up like the one below, but everything seems to work as expected.
<telerik:RadAsyncUpload
    MaxFileInputsCount="10"
    ID="RadAsyncUpload1" runat="server">
</telerik:RadAsyncUpload>

I've also attached the sample page I used to test it. Could you verify whether the problem reproduces on the page? If not, modify it so that it is set up like yours and it reproduces the issue, and then send the code back to us, so that we can test it locally.
 
Regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Raji
Top achievements
Rank 1
answered on 15 Feb 2012, 06:42 PM
Hi Bozhidar,

I also have the same code. I am using .NET 2.0. After I browse 10 files the "Select" button disappers. I delete one of the files and still the "Select" button does not show up. The total files is now 9 and I want add another file. Let me know if this not clear. I have attached the screen shots

Thanks,
Raji
0
Bozhidar
Telerik team
answered on 16 Feb 2012, 12:34 PM
Hello Raji,

I'm still unable to reproduce the problem.

Could you share the exact version of the controls you are using. Also, which browser and what version of it do you test the page with, and does the problem reproduce on other browsers. Could you also specify which module does the Upload use.
 
Regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Raji
Top achievements
Rank 1
answered on 16 Feb 2012, 07:16 PM
Hi Bozhidar,

I am using Telerik.Web.UI.dll (Ver 2010.3.1317.20), IE 7.0 browser only, .Net 2.0, VS2005.
Do you have working sample code for .net 2.0?

Thanks,
Raji
0
Bozhidar
Telerik team
answered on 17 Feb 2012, 02:31 PM
Hi Raji,

I've managed to reproduce the issue using your version of the controls. This seems to be a bug in RadAsyncUpload when run under .NET 2.0. Unfortunately we no longer support .NET 2.0, so this bug probably won't be fixed. 

However, there is a workaround to this issue that you can use. Put the following function on the OnClientFileUploadRemoved client event:
function fileUploadRemoved(upload, args) {
    if (upload.getUploadedFiles().length == upload.get_maxFileCount() - 1)
        upload.addFileInput();
}

 
All the best,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Raji
Top achievements
Rank 1
answered on 18 Feb 2012, 02:28 AM
Hi Bozhidar,

The client side code that you sent works fine.
I came across another problem. I have set the following property on the AsyncUpload control MultipleFileSelection="Automatic" MaxFileInputsCount="10". Now I select the Select button and select more than 10 fines. The control downloads all the selected files. Is their a way to skip the remaining files after the 10th file and do not display. I have attached the screen shot.
I know that when you upload it just gets the first 10 files and the remaining it skips.

Let me know if you need more info.

Thanks,
Raji
0
Bozhidar
Telerik team
answered on 20 Feb 2012, 09:21 AM
Hi Raji,

Thank you for getting back to us.

Officially we do not support using these two features together. But still you can use another workaround to delete the extra files when they are selected. Just add the following code to the OnClientFileUploaded event:
function fileUploaded(upload, args) {
    var uploadedCount = upload.getUploadedFiles().length;
    var maxCount = upload.get_maxFileCount();
             
    if (uploadedCount > maxCount)
        upload.deleteFileInputAt(maxCount);
}

Hope this was helpful.
 
Regards,
Bozhidar
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
AsyncUpload
Asked by
Raji
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Raji
Top achievements
Rank 1
Share this question
or