Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify subdirectory in resources dynamically with url parameter? #10

Open
tybowman opened this issue Apr 25, 2014 · 4 comments
Open

specify subdirectory in resources dynamically with url parameter? #10

tybowman opened this issue Apr 25, 2014 · 4 comments

Comments

@tybowman
Copy link

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.

@arndta
Copy link
Owner

arndta commented Apr 25, 2014

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 [email protected] 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//issues/10
.

@tybowman
Copy link
Author

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 & "")

@arndta
Copy link
Owner

arndta commented Apr 26, 2014

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" [email protected] 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//issues/10#issuecomment-41448282
.

@tybowman
Copy link
Author

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) { %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants