The Coldfusion Open Source Forums
Home | ImageCFC | CFFM | BlogCFM | CFMBB | CFOpenMail / ImapCFC | CFOpenChat
Forums | Profile | Inbox | Members | Chat | Search | Login | RSS
Vivio Technologies VPS Hosting
New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page

Forums: CFFM: Specifying root folder for each ses
Created on: 10/01/09 {ts '2013-05-24 15:24:00'} Views: 1973 Replies: 2
Specifying root folder for each session separately
Posted Thursday, October 1, 2009 at {ts '2013-05-24 15:24:00'}

Is there any way to specify the root folder for the file manager for each session separately? The thing is i need every user to see just content of their folder on a web server.

RE: Specifying root folder for each ses
Posted Thursday, October 1, 2009 at {ts '2013-05-24 16:09:00'}

Assuming that these users are authenticated and you know it, then you can dynamically set the directory based on their user information

in cffm.cfm:


   <!--- includeDir = You can and probably should hard code this... by default, the directory is a
      directory named "custom" located in the same directory as this file.
      FOR RAM DRIVE: use "ram:///" (CF9+)
      --->

   <cfinvokeargument name="includeDir" value="#expandPath(".")#/custom">
   <!--- includeDirWeb = web path to the directory specified above.
      FOR RAM DRIVE: use "/" (CF9+)
   --->

   <cfinvokeargument name="includeDirWeb" value="#replaceNoCase(cgi.script_name,'/cffm.cfm','','ALL')#/custom">

Just modify those two variables based on the authenticated user.

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: Specifying root folder for each ses
Posted Tuesday, December 22, 2009 at {ts '2013-05-24 17:47:00'}

ok that's fixed using session or cookie variables, the trouble now is when you try to upload a file, it throws an: error http 500

I checked in the application log and i see that those variables are undefined, the only way i can upload files is using static paths but i must use only dynamic paths, any idea to this?

Update: It works fine on IE8 over Windows 7

Edited 12/22/09 {ts '2013-05-24 22:06:00'}

New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page
Subscription Options
Subscription options are available after you log in.

There are 81 active user sessions right now.