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

Any way to alert the user of a bad file type?

2 Answers 49 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ed Staffin
Top achievements
Rank 1
Ed Staffin asked on 08 Dec 2008, 09:55 PM
I know I can limit the file types that can be uploaded via AllowedFileExtensions, however, all it does is ignore bad file types. Since I am only allowing one file at a time to be uploaded, it would be nice if I could issue a radalert or something when the try to upload a type that is not allowed.
Any ideas?
Thanks ... Ed

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Dec 2008, 03:17 PM
Hi Ed Staffin,

I believe this example will help you achieve your goal.

I hope this helps,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Meaning Of Lights
Top achievements
Rank 2
answered on 10 Dec 2008, 12:34 AM
As per http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2803992&SiteID=1

Lookup "Winista" it uses binary analysis to determine a files MIME type...

Say someone renames a exe with a jpg extension... you can still determine the "real" file format.  It doesn't detect swf's or flv's but does pretty much every other well known format + you can get a hex editor and add more files it can detect.

HTH
Tags
Upload (Obsolete)
Asked by
Ed Staffin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Meaning Of Lights
Top achievements
Rank 2
Share this question
or