NetTalk Central

Author Topic: Change File Path extension for Netweb  (Read 26260 times)

Carlos Gutierrez

  • Newbie
  • *
  • Posts: 3
    • View Profile
Change File Path extension for Netweb
« on: July 05, 2007, 09:29:17 PM »
In a project, I needed to let the user choose wich company to log to, and each company was in a different folder. I added a droplist to the login form, stored the path in a session variable, and developed this template to change the data path of all used files in the application. It should be added as an extension to the Nettalk object in the WebHandler procedure.

Prompts:
'Path Variable (no \ at end)'
Checkbox 'Is a session variable'
List of files to exclude
Checkbox 'Disable this extension'

It uses PROP:Name to change the path of each file when the working thread is started. As files usually are threaded, this redirection only lasts for the life of the thread. This way, the netweb server can serve data from multiple folders as requested by each user/session.

I hope somebody finds it useful.

Carlos Gutierrez


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Change File Path extension for Netweb
« Reply #1 on: July 06, 2007, 05:02:02 AM »
Hi Carlos,

cool!
Would you like me to include it in the shipping template?

Cheers
Bruce

Carlos Gutierrez

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Change File Path extension for Netweb
« Reply #2 on: July 06, 2007, 08:20:04 AM »
Hi Bruce,
Would you like me to include it in the shipping template?
Yes, please do. Thanks!