Hi!
I'm trying to configure a CKFinder instance to have a different rootFolder. This to create a specific page for the user to only view/upload images to that folder without letting him access the parent folders.
So I first tried to use a custom config:
<script type="text/javascript" src="@Url.Content("~/Content/CKFinder/ckfinder.js")"></script> <script type="text/javascript"> var finder = new CKFinder(); finder.create({ customConfig: '@Url.Action("Config", "CkFinder")' }); </script>
That Url.Action() would return a js file like:
CKFinder.customConfig = function( config ) { config.removePlugins = 'basket'; config.baseUrl = 'http://localhost/Media/Folder1'; config.baseDir = 'c:\Mediaserver\\Images\Folder1'; }
But that doesn't work. The basket folder gets removed but apparently the baseUrl and baseDir must be defined on the connector itself. (In my case the config.ascx file)
So then I tried to use the ConnectorInfo parameter to pass some extra data to the connector:
<script type="text/javascript" src="@Url.Content("~/Content/CKFinder/ckfinder.js")"></script> <script type="text/javascript"> var finder = new CKFinder(); finder.create({ id: 'myFinder', connectorInfo: "rootDir=folder1", customConfig: '@Url.Action("Config", "CkFinder")' }); </script>
Unfortunatelly, the ConnectorInfo data is not passed on the request, only the ID is. The query string becomes:
http://localhost:7487/Content/CKFinder/core/connector/aspx/connector.aspx?command=Init&id=myFinder
Is this a bug? Or am I missing something? I'm using CKFinder 2.1 and the aspx connector with ASP.NET MVC3
Many thanks for your help!
Regards,
[EDIT: I just noticed I posted my question on the CKEditor sub-forum. Could some moderator please move it to the correct one? Thanks!]
// Post moved.
Re: CKFinder connectorInfo parameter not working
Anyone?
Re: CKFinder connectorInfo parameter not working