Image Manager view images restriction

2 posts, 1 answers
  1. Caleb
    Caleb avatar
    2 posts
    Member since:
    Jul 2012

    Posted 21 Aug 2012 Link to this post

    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?
  2. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 24 Aug 2012 Link to this post

    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.
Back to Top