NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on January 28, 2010, 02:16:25 AM

Title: NTWS4.44 - uploading to 2 different folders
Post by: terryd on January 28, 2010, 02:16:25 AM
I have 2 forms which upload files. I want to upload the files from one form to \uploads and from the other to \uploads2 (e.g)
How would I handle this. I assume it would be a modification in the code in the webhandler's RenameFile Procedure but I'm not sure how to go about it.
Any ideas?
Thanks
Title: Re: NTWS4.44 - uploading to 2 different folders
Post by: kevin plummer on January 28, 2010, 03:02:17 AM
This link may help - otherwise search on upload

http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=909.0
Title: Re: NTWS4.44 - uploading to 2 different folders
Post by: Robert Iliuta on January 29, 2010, 07:02:22 AM
Hallo Terry,

I have this code on WebHandler on RenameFile before the parent.


! Separate TPS and JPEG

case xExtractExt(clip(UPPER(p_filename)))  ! Extract the extension
 of 'TPS'
    self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads\Statistica'  ! first folder
 of 'JPEG' orof 'JPG' orof 'BMP'
    self.site.UploadsPath = clip(self.site.WebFolderPath) & '\uploads\Photo'  ! second folder
end


It works perfect for more then 6 months ! I made the difference by extension, but you could do by any filter you want.....

Maybe it will help you,

Regards,
Robert
Title: Re: NTWS4.44 - uploading to 2 different folders
Post by: terryd on January 29, 2010, 07:20:43 AM
Thanks
This looks exactly what I need.