RadEditor Imagemanager viewpath

6 posts, 0 answers
  1. Sandeep
    Sandeep avatar
    4 posts
    Member since:
    Dec 2010

    Posted 27 May 2011 Link to this post

    Hello,
    I'm using radEditor in my ASP.net application but i want to set view path of ImageManager runtime.
    My Images directory is on differnt server so I created virtual directory in my application which is pointing to that server,
    I have differnt images for each user so there are one folder per user. so i want to display user specific images to particular user. As do not want to see all images uploaded by  other user.

    Can anybody help me to find solution for this issue.

    Thanks in Advance,
    Sandeep
     
  2. Rumen
    Admin
    Rumen avatar
    13884 posts

    Posted 31 May 2011 Link to this post

    Hello Sandeep,

    It is standard practice to have your users' IDs stored in a database of your CMS, and create a specific folder for each user when a user account is created. Then, when a user is logged and wishes to use the editor, setting the user's folder for this particular logged user is a matter of a single line of code, such as

      RadEditor1.ImageManager.ViewPaths = New String() {"~/Images/" + LOGGEDUSERID }

    Thus each user will have access only to his/her folder, and be able to do whatever you let them do, without interfering with other users (and yes, if you have 100 users you will need to create 100 folders).

    The only other way is for you to implement your own image manager with your own security and user authentication/authorization that handles your custom logic of determining and distinguishing what user uploaded what file, and what user has the right to delete what file.

    Greetings,
    Rumen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Parimala
    Parimala avatar
    4 posts
    Member since:
    Aug 2010

    Posted 08 May 2012 Link to this post

    Hello Telerik Team,

    My issue is similar. What I need to do is I don't want to create a folder for each user, whenever the user clicks on the image manager and click  Insert then it needs to create the folder for the user and upload the image. Because every day hundred user enters and its keep accumulating with folders, most of the folder don't have images, it's just an empty folder.

    I want to create the folder only if the user want to add a image, and also the user should not see other user folder(this can be avoided by having the view path pointing to the folder name, but I don't want to create the folder until unless they insert the image). Then how to set the viewpath and upload path which is pointing to the shared location.

    Thanks in advance
    Regards
    Parimala

  4. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 11 May 2012 Link to this post

    Hi Parimala,

    RadEditor does not offer the functionality to achieve the required result. Nevertheless, I would suggest you to handle this scenario on application level.
    1. When user logs in to the website create a separate folder and set it to the ViewPaths / UploadPaths / DeletePaths of ImageManager.
    2. When the user logs out check the folder's content and if it is empty delete the folder.

    All the best,
    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.
  5. Kristopher
    Kristopher avatar
    5 posts
    Member since:
    Feb 2011

    Posted 18 Jun 2013 Link to this post

    Hi Telerik!

    Can i use UNC path in radeditor ImageManager ViewPaths?

    Thanks,
  6. Ivaylo
    Admin
    Ivaylo avatar
    37 posts

    Posted 18 Jun 2013 Link to this post

    Hi Kristopher,

    I am afraid that UNC path strings are not supported in the Image Manager, unless you have implemented a custom content provider for the Editor. You can read more about Custom File Dialogs Content Providers in our online demos.

    Such provider is available in this KB article: Use RadFileExplorer with physical and shared folder's paths

    More detailed information on how to implement a custom content provider is available in the following help article, since the FileExplorer is a child control for the ImageManager dialog:
    Using custom FileBrowserContentProvider

    If you have any other questions, do not hesitate to contact us.

    Regards,
    Ivaylo
    Telerik
    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 the blog feed now.
Back to Top