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

Image Manager view images restriction

1 Answer 27 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Caleb
Top achievements
Rank 1
Caleb asked on 21 Aug 2012, 07:04 PM
I have a situation where I would like to restrict the images shown in the manager window to a specific subset of the entire folder, but also allow them to upload images to that folder. Specifically, only display images that are already referenced in the text that has been loaded into the editor, or images that have been uploaded in the current session. 

For example, if the contents of the editor does not have any images, then no images would be available in the image manager, regardless of what the view folder contains. However, any images that were uploaded in that same session should be available to insert. Alternatively, if the editor has been loaded with content that does contain images, then those images, and only those images, should be available (again, except for images that the user uploads within that session).

This could be done if there was a way to define a search pattern for the view that's separate from the upload search pattern, but since that's not defined I'm looking for alternative means to replicate this functionality. I'm looking for a way to limit the images that are accessible by document's they are included in so a person who is editing document A can't see the images uploaded for document B.

Is there currently a way to implement this functionality?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dobromir
Telerik team
answered on 24 Aug 2012, 10:20 AM
Hi Caleb,

ImageManager dialog is using RadFileExplorer control to provide the file browsing functionality. In order to apply custom file filtering you need to subclass the content provider and orverride the ResolveDirecotry() method to filter the listed files. Please take a look at the following live demo for an example on how to apply file filtering for the explorer control:
FileExplorer / Filter files and download

An example of how to assign custom content provider to the ImageManager's dialog is available in this live demo.

Kind regards,
Dobromir
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
Editor
Asked by
Caleb
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or