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
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)
Session var ain 't working either with me.
Is there a way to set that baseUrl via javascript in my View somehow while connecting ckfinder to the editor?
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)
Session var ain 't working either with me.
Is there a way to set that baseUrl via javascript in my View somehow while connecting ckfinder to the editor?
var editor = CKEDITOR.replace("profiel_lange_beschrijving", { toolbar: 'Full' }); CKFinder.setupCKEditor(editor, '/Content/ckfinder');
Re: CKFinder integration ASP.NET MVC3 - dynamic path
Hi,
do you use flashupload ? If yes, please try disable it: http://docs.cksource.com/ckfinder_2.x_api/symbols/CKFinder.config.html#.removePlugins and check if you see your session variable during upload.
Please write if this change anything.
Re: CKFinder integration ASP.NET MVC3 - dynamic path
Awesome, it works! Although I liked that flash uploader. But I guess there is no workaround for that?
Thanks for this solution already.
Re: CKFinder integration ASP.NET MVC3 - dynamic path
Here http://cksource.com/forums/viewtopic.php?f=10&t=23616 you can check problems that other have with flash upload. We are working to resolve this. Maybe others solution/suggestions helps you.