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

Stand alone imagebrowser with local paths

4 Answers 121 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
James Shelton Agar
Top achievements
Rank 2
James Shelton Agar asked on 24 Sep 2009, 04:40 AM

as for the post you'd solved the other day, local path  for fileexplorer, works pretty well, thanks
http://www.telerik.com/community/code-library/aspnet-ajax/file-explorer/use-local-path-instead.aspx

I am now trying to putup a feature for users to maintain images from my local path(not web root), as I can callout the imagemanager standalone as solved

how can i access the filebrowser within imagemanager and change file provider to support local path?

thanks

4 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 24 Sep 2009, 01:47 PM
Hi James,

The ImageManager object has a ContentProviderTypeName property which can be used to set the new content provider to it. For example you can set the provider to the image manager as shown bellow :

protected void Page_Load(object sender, EventArgs e) 
    imageManager.ContentProviderTypeName = typeof(CustomProvider.CustomFileProvider).AssemblyQualifiedName; 

You need to set this property in the Page_Load event at latest.

I hope this help.

Greetings,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James Shelton Agar
Top achievements
Rank 2
answered on 27 Nov 2009, 12:12 AM
Hi i have called up the imagemanager window like following

        Dim imageManagerParameters As New FileManagerDialogParameters()
        imageManagerParameters.ViewPaths = New String() {"~/Images/User"}
        imageManagerParameters.UploadPaths = New String() {"~/Images/User"}
        imageManagerParameters.DeletePaths = New String() {"~/Images/User"}
        imageManagerParameters.MaxUploadFileSize = 5000000


        ' If you don't set the following property, the default value will be used  
        ' imageManagerParameters.SearchPatterns = new string[] { "*.jpg" };  
        
        Dim imageManager As New DialogDefinition(GetType(ImageManagerDialog), imageManagerParameters)
        imageManager.ClientCallbackFunction = "ImageManagerFunction"
        imageManager.Width = Unit.Pixel(694)
        imageManager.Height = Unit.Pixel(440)

        'If you need to customize the dialog then register the external dialog files
        imageManager.Parameters("ExternalDialogsPath") = "~/EditorDialogs/"

        DialogOpener1.DialogDefinitions.Add("ImageManager", imageManager)

        Dim imageEditorParameters As New FileManagerDialogParameters()
        imageEditorParameters.ViewPaths = New String() {"~/Images/User"}
        imageEditorParameters.UploadPaths = New String() {"~/Images/User"}
        imageEditorParameters.DeletePaths = New String() {"~/Images/User"}
        imageEditorParameters.MaxUploadFileSize = 5000000

        Dim imageEditor As New DialogDefinition(GetType(ImageEditorDialog), imageEditorParameters)
        imageEditor.Width = Unit.Pixel(832)
        imageEditor.Height = Unit.Pixel(520)
        imageEditor.Parameters("ExternalDialogsPath") = "~/EditorDialogs/"
        DialogOpener1.DialogDefinitions.Add("ImageEditor", imageEditor)

However, i couldn't find ContentProviderTypeName property anywhere. 
0
Accepted
Fiko
Telerik team
answered on 30 Nov 2009, 11:23 AM
Hi James,

The ImageManager object has a FileBrowserContentProviderTypeName property which can be used to set the new content provider. For example:

imageManagerParameters.FileBrowserContentProviderTypeName = GetType(CustomProvider.CustomProvider).AssemblyQualifiedName

I hope this help.

Greetings,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
James Shelton Agar
Top achievements
Rank 2
answered on 17 Dec 2009, 12:20 AM
Thank you, it makes senses now
Tags
FileExplorer
Asked by
James Shelton Agar
Top achievements
Rank 2
Answers by
Fiko
Telerik team
James Shelton Agar
Top achievements
Rank 2
Share this question
or