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

[Solved] Hiding Image browser URL details

2 Answers 164 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stefan
Top achievements
Rank 1
Stefan asked on 29 Sep 2011, 09:33 AM
Hello,

We have an application with serves various customers. Each customer has its specific content directory where their files are stored.In our application this is ~/Mediabase/ + Customer GUID. We had now a requierement that the customer schould only see the word "Root" instead of the Customer GUID in the URL for browsing. I sucessfully changed the behavior of the Image browser changing the methods Browse and Thumbnail.

In the overwritten Browse Method of the EditorFileBrowserController I replace the customer part of the path property of the json result with "Root". Browsing and Thumbnails work fine.

The only problem I have now is, when inserting an image. Instead of the  /Mediabase/CustomerGuid/Image now the url is /Root/Image and I get an error "NetworkError: 404 Not found ...". I think I have to change the url back again before inserting the image. But how can I do that ? Is there a client event handler where I can customize the behavior when inserting ?

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 29 Sep 2011, 01:19 PM
Hi Stefan,

You may specify the FileBrowser Image route if additional action should be taken in order image to be displayed. In this case the declared action method will be called passing the image path. This action should serve the actual image.

Best wishes,
Rosen
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Stefan
Top achievements
Rank 1
answered on 29 Sep 2011, 03:00 PM
Hi Rosen,

It worked perfectly. Thank you very much !
Tags
Editor
Asked by
Stefan
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or