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

Changing AllowedFileExtensions and FileFilters in codebehind

1 Answer 158 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Esteban
Top achievements
Rank 1
Esteban asked on 23 Apr 2012, 09:23 PM
Hi,

I am trying to filter the allowed files to upload depending on the media library that has been selected. (docs, images, videos, etc)

I have the radasyncupload control in a modal window. Switching between media categories is done with a button for each cat. I tried to change the AllowedFileExtensions property there for each media type but it didn't work. Should I set it somewhere else?

Also, how could I change FileFilter description and extensions in codebehind? is it even possible? i tried using Eval("desc/ext") but I have must missed something. 


<FileFilters>
  <telerik:FileFilter Description="Images(jpg;jpeg;png;gif)" Extensions="jpg,jpeg,png,gif" />
</FileFilters>

Any suggestions would be appreciated it. I am thinking in doing a radasyncupload control for each media type and just hide/display accordingly but I would like to avoid that.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 26 Apr 2012, 10:03 AM
Hello Esteban,

In general we strongly recommend using the AllowedFileExtensions property instead of the FileFilters. I've prepared a sample page showing how to change the AllowedFileExtensions dynamically upon button clicking.

All the best,
Dimitar Terziev
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
Esteban
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or