After some struggling I was able to integrate ckfinder in my project. I have one issue left at the moment.
In the config.ascx I try to set my path like this
companyID = General.GetCompanyIdByUsername(Context.User.Identity.Name);
BaseUrl = "/Content/Profiles/" + companyID + "/editor/";
I have multiple users, so I would like to assign a different folder per user based on the username.
While opening the file manager popup, the correct folder is taken. When I try to upload files, it seems that Context.User.Identity.Name is unknown and therefore upload to an incorrect folder. I assume that the User is unknown in that context because of the popup... (I don't have this problem when I set a fix username)
Is there a way to set that baseUrl via javascript in my View somehow while connecting ckfinder to the editor since I can 't fix it with a session var either?
This is the code I have right now in my view to connect ckfinder to my ckeditor :
<script src="@Url.Content("~/Content/ckeditor/ckeditor.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/ckfinder/ckfinder.js")" type="text/javascript"></script>
var editor = CKEDITOR.replace("profiel_lange_beschrijving", { toolbar: 'Full' });
CKFinder.setupCKEditor(editor, '/Content/ckfinder');
I feel it should be possible to set that baseurl/basedir somehow here, but no idea how to do that, or what var name I need to use. The documentation isn't bringing me any further.