Open tybowman opened 10 years ago
Is it a possibility to set a few session variables?
If you were able to set "TFM_UploadPath" and "TFM_ThumbPath" to a user directory before opening the file manager, it should restrict them to that path.
On Fri, Apr 25, 2014 at 4:27 PM, tybowman notifications@github.com wrote:
We have 400 sub webs in our cms each with their own folder to store their own images and files. Is there a way to pass a folder name to restrict the file manager to navigate only that folder and (and subfolders) instead of one resources folder shared by all? Thanks.
— Reply to this email directly or view it on GitHubhttps://github.com/arndta/TinyFileManager.NET/issues/10 .
I should be able to set/add session variables but I tried below (VB) and it didn't work. I tried setting/adding these in the page that loads the tinymce editor (VB). Btw, we are using Windows authentication and the filemanager directory is in an authenticated directory. I also tried these using C# in the dialog.aspx page on page_load which produced an error.
HttpContext.Current.Session("TFM_UploadPath") = "uploads\webadminpractice\" HttpContext.Current.Session("TFM_ThumbPath") = "uploads\webadminpractice\" HttpContext.Current.Session.Add("TFM_UploadPath", "uploads\" & sWeb.Replace(" ", "").ToLower & "\") HttpContext.Current.Session.Add("TFM_ThumbPath", "uploads\" & sWeb.Replace(" ", "").ToLower & "\")
I'm not sure I've tested that in a good while. I'll get back to you on that.
Might be a good test to have dialog.aspx output the session vars and see if it has a value. Could be some weirdness with app pools and stuff. On Apr 25, 2014 6:16 PM, "tybowman" notifications@github.com wrote:
I should be able to set/add session variables but I tried below (VB) and it didn't work. I tried setting/adding these in the page that loads the tinymce editor (VB). Btw, we are using Windows authentication and the filemanager directory is in an authenticated directory. I also tried these using C# in the dialog.aspx page on page_load which produced an error.
HttpContext.Current.Session("TFM_UploadPath") = "uploads\webadminpractice\" HttpContext.Current.Session("TFM_ThumbPath") = "uploads\webadminpractice\" HttpContext.Current.Session.Add("TFM_UploadPath", "uploads\" & sWeb.Replace(" ", "").ToLower & "\") HttpContext.Current.Session.Add("TFM_ThumbPath", "uploads\" & sWeb.Replace(" ", "").ToLower & "\")
— Reply to this email directly or view it on GitHubhttps://github.com/arndta/TinyFileManager.NET/issues/10#issuecomment-41448282 .
I tried looping through the session variables in Page_Load but there are two problems. 1) There is no way to override Page_Load and 2) none of the objects are recognized.
1) S0506: 'ASP.dialog_aspx.Page_Load(object, System.EventArgs)': cannot override inherited member 'TinyFileManager.NET.dialog.Page_Load(object, System.EventArgs)' because it is not marked virtual, abstract, or override Line 3: public override void Page_Load(object sender, EventArgs e)
2) System.NullReferenceException: Object reference not set to an instance of an object. Line 68: <% if (this.objConfig.boolAllowUploadFile) { %>
We have 400 sub webs in our cms each with their own folder to store their own images and files. Is there a way to pass a folder name to restrict the file manager to navigate only that folder and (and subfolders) instead of one resources folder shared by all? Thanks.