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

Image Paths

3 Answers 141 Views
Editor
This is a migrated thread and some comments may be shown as answers.
?
Top achievements
Rank 1
? asked on 13 Aug 2008, 05:38 AM
My web app uses the editor control as a content manager for public-facing web pages.  with the admi page in a /Admin sub-directory, putting in ~\Images for my upload paths has worked fine for the editor and for the actual public-facing pages since ~\Images is accessible from either way.

However due to security concerns, I must move my \Admin folder to a separate virtual web site that is internal-facing only (but on the same web server as the public site).  Now the path ~\Images is no longer available to both web applications.  I tried creating a full URL to the images folder, but the control only accepts relative paths.  So now I'm stuck between a rock and a hard place...  how can I make the image manager on one web site see a path that my other web site can access?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 13 Aug 2008, 06:41 AM
Hi Mark,

You can insert images with absolute paths via the Image Manager by enabling the MakeUrlsAbsolute filter like this:

C#

RadEditor1.EnableFilter(EditorFilters.MakeUrlsAbsolute);


Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
?
Top achievements
Rank 1
answered on 14 Aug 2008, 05:31 AM
Maybe I'm still missing something, but I added the code you noted below into my page's OnLoad event.  then with http://website/Images configured at design time as the DeletePaths, UploadPaths, and ViewPaths, I run the web app, and when I launch the Image Manager, get a "Server Error in /WebSite Application - 'http://website/images' is not a valid virtual path".
0
Rumen
Telerik team
answered on 14 Aug 2008, 07:00 AM
Hi,

In particular cases, the nature of ASP.NET and IIS in particular does not permit you to use absolute paths which point outside your application. The ViewPaths and UploadPaths properties are one of these cases - you can use relative paths and/or virtual directories.

The ViewPaths and UploadPaths properties should receive as an argument an array of string paths pointing to folders that should be:
  • a subdirectory of your web application
  • a directory placed in the root of IIS - you can set this folder by using the / forward slash symbol, e.g.
    RadEditor1.ImageManager.UploadPaths  = new String []{"/Images"};
  • a virtual directory of your web application that has a physical path pointing outside of your web application.
  • a shared drive that is a virtual folder of your web application. You can see the following KB article for more information: Uploading images and files to a Shared Drive.
You can find more information here: Uploading images to the server (upload tab is disabled).

All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
?
Top achievements
Rank 1
Answers by
Rumen
Telerik team
?
Top achievements
Rank 1
Share this question
or