in reply to uploading a file to an FTP site
Once the file is uploaded his form handler can test to see if the uploaded file is binary, move it based on the file type, and so on. The CGI.pm documentation provides the following example of how to move an uploaded file:
# Copy a binary file to somewhere safe open (OUTFILE,">>/usr/local/web/users/feedback"); while ($bytesread=read($filename,$buffer,1024)) { print OUTFILE $buffer; }
I have never used Net::FTP, but I suspect its use would be overkill in a case where ftp is not required.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: uploading a file to an FTP site
by dvergin (Monsignor) on Mar 22, 2001 at 05:14 UTC |