NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: estadok on January 20, 2013, 09:54:06 AM
-
Hi!
What i'm doing wrong?
p_web.RenameFile PROCEDURE(STRING p_name,STRING p_filename,<String p_path>)
ReturnValue ANY
! Start of "NetTalk Method Data Section"
! [Priority 5000]
! End of "NetTalk Method Data Section"
CODE
IF SELF.GSV('glo:agreement') = 0
p_path = clip(self.site.WebFolderPath) & '\uploads\' &self.GSV('KLIF:Phone')
ELSE
p_path = clip(self.site.WebFolderPath) & '\uploads\agreements'
SELF.SSV('glo:agreement',0)
.
! Parent Call
ReturnValue = PARENT.RenameFile(p_name,p_filename,p_path)
! [Priority 7500]
SELF._Trace(ReturnValue)
self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads'
RETURN ReturnValue
SELF._Trace(ReturnValue) this method returns the correct path to file, but file don't apears in folder... What is wrong in this code?
-
Don't change the parameter p_path, but propertie self.site.UploadsPath before Parent Call
So, try:
p_web.RenameFile PROCEDURE(STRING p_name,STRING p_filename,<String p_path>)
ReturnValue ANY
! Start of "NetTalk Method Data Section"
! [Priority 5000]
! End of "NetTalk Method Data Section"
CODE
IF SELF.GSV('glo:agreement') = 0
self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads\' &self.GSV('KLIF:Phone')
ELSE
self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads\agreements'
SELF.SSV('glo:agreement',0)
END
! Parent Call
ReturnValue = PARENT.RenameFile(p_name,p_filename,p_path)
! [Priority 7500]
SELF._Trace(ReturnValue)
self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads'
RETURN ReturnValue
Regards,
Matthew
-
Hi there,
I use a two-step (basic) method.
1. Wait for the file to be uploaded to the default upload folder, then
2. Move (rename) the file to whereever (in the web folder) I want.
-
Thanks for advice! Both of these methods are work fine! :)