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

Rad Asynch File Upload Problem

1 Answer 45 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Arvind
Top achievements
Rank 1
Arvind asked on 04 May 2012, 04:23 PM
Hi Telerik Team,

I am using the RadAsncFileUpload control to upload files and save them them in Database, I have kept the filter for RadAsncFileUpload to allow only word documents, but when i attach other type of the files it shows them as an invalid files but when I click on save button to upload files it does not throw me any error, and does not save in database.

Please help me what should I do in order to validate the RadAsncFileUpload before saving the file in database.
I have tried the following code:
<telerik:RadScriptBlock ID="rcb" runat="server">
    <script type="text/javascript">
        function DeleteInvalidFiles() {
            debugger;
            var upload = $find("<%= RadAsyncFile_Upload.ClientID %>");
            var inputs = upload.getUploadedFiles();
            for (i = inputs.length - 1; i >= 0; i--) {
                if (!upload.isExtensionValid(inputs[i].value))
                    upload.deleteFileInputAt(i);
            }
        }
    </script>
</telerik:RadScriptBlock>

Thanks,
Arvind.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 09 May 2012, 03:53 PM
Hello Arvind,

 
You can refer to this forum thread where similar issue have been discussed.

Hope this will be helpful.

Regards,
Plamen Zdravkov
the Telerik team
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
Arvind
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or