Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change image upload path *dynamically* in FCKeditor

I'm using the ASP.NET binary for my FCKeditor, and needs to insert two editors on the same page. The uploaded images/browsing needs to go to two different directories, how do I do this from code-behind?

I know the path for uploaded files are set in the config.ascx-file with the UserFilesPath setting, but I can not find a way to override this value from my aspx.cs file.

Also, I found (conflicting) documentation stating that Session["FCKeditor:UserFilesPath"] could be set, but I dont like putting usercontrol-specific information in a global session variable.

like image 594
Espo Avatar asked Aug 14 '09 09:08

Espo


1 Answers

first you need assign User Identity information into Session["UserInfo"]

then go to [fckeditor root folder]/filemanager/connector/aspx/config.ascx

string Userfolder = Session["UserInfo"].ToString(); // URL path to user files. UserFilesPath = "~/Upload/" + Userfolder;

like image 107
D.J Avatar answered Oct 17 '22 14:10

D.J