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

RadEditor Imagemanager viewpath

5 Answers 143 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 27 May 2011, 07:14 AM
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
 

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 May 2011, 01:48 PM
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.

0
Parimala
Top achievements
Rank 1
answered on 08 May 2012, 10:55 AM
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

0
Dobromir
Telerik team
answered on 11 May 2012, 07:57 AM
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.
0
Kristopher
Top achievements
Rank 1
answered on 18 Jun 2013, 08:09 AM
Hi Telerik!

Can i use UNC path in radeditor ImageManager ViewPaths?

Thanks,
0
Ivaylo
Telerik team
answered on 18 Jun 2013, 02:56 PM
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.
Tags
Editor
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Parimala
Top achievements
Rank 1
Dobromir
Telerik team
Kristopher
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or