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

File Filter Flaw

3 Answers 39 Views
Upload
This is a migrated thread and some comments may be shown as answers.
SchaF
Top achievements
Rank 1
SchaF asked on 16 Mar 2012, 04:38 PM
I recently discovered a flaw with the file upload filter being used with the upload control. I have an upload control set to allow only .pdf and .tif files, so when I click browse to search for files, the only ones that show up as being allowed to be uploaded are .pdf and .tif. However, I I decide to type the file name in, it will allow me to upload whatever I want from .txt, .xaml, .xml or even files with no extensions.

Any reason why this would be happening?

3 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 19 Mar 2012, 10:29 AM
Hello,

 This filter is only how the files are shown in the Open File Dialog. The filter does not prevent adding items in the Upload control that do not meet the filter's criteria. If you want to allow uploading item of only certain types or extensions, you can use the RadUploadItem.Validate event. You can see how to use it here.

Kind regards,
Alex Fidanov
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
Richa
Top achievements
Rank 1
answered on 10 Jul 2012, 06:26 AM
Hi,

But the code given given in link is not working. It is giving error that
No overloaded method AddHandler accept two arguments.
0
Petar Mladenov
Telerik team
answered on 12 Jul 2012, 10:49 AM
Hello Richa,

 Can you please confirm that you have added a reference to the Telerik.Windows namespace?
If yes, is it possible for you to send us a new support ticket with a project in which your issue is reproducible? Thank you in advance. 

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Upload
Asked by
SchaF
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Richa
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or