NetTalk Central

Author Topic: Dynamic folder names for file upload  (Read 3876 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Dynamic folder names for file upload
« on: August 09, 2010, 06:24:38 AM »
In my forms I have a unique record number(Job Number) which I want to use as the folder name ie "uploads\123456\".
How do I get that number from a webform to the webhandler when I press the save button, so I can use it?

Ashley Stahl

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Dynamic folder names for file upload
« Reply #1 on: August 09, 2010, 12:04:16 PM »
Hi Ashley,

WebHandler proc, RenameFile, after the parent call.
See attached image.
The code is something like:

  self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads\MyNewFolder'




[attachment deleted by admin]
-----------
Regards
Alberto

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Dynamic folder names for file upload
« Reply #2 on: August 09, 2010, 02:43:31 PM »

How do I get that number from a webform to the webhandler when I press the save button, so I can use it?

> in your form add it to the session Q eg p_web.ssv('JobNumberFolder',job:jobnumber)

> in the web handler self.site.UploadsPath = clip(self.site.WebFolderPath) & self.gsv('JobNumberFolder')

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Dynamic folder names for file upload
« Reply #3 on: August 10, 2010, 05:14:26 AM »
Thanks Guys!!!! That did it, works like a charm.


ashley Stahl