I'm trying to use NET::FTP to transfer files from a cgi script on a webserver to a ftp server for archiving. The end user will upload a PDF via the cgi script, then it will be sent to the ftp server. For beurocratic reasons these machines must be seperate, and I don't have direct control over the webserver.
The problem is that NET::FTP truncates every file I try to send this way. The file makes it intact to the webserver, but it is truncated when it arrives at the ftp server. Using standard unix ftp I have no problems, however I have not found a way to use anything other than NET::FTP in a perl script. ( scp won't work for anonymous xfers, which I need ). Ascii and binary modes have the same effect as both platforms are running *nix variants ( I've also tested it ).
The relevnant code is:$ftp->login('anonymous','submit@somesrvr.that.exists.edu'); $ftp->put("$prefix"."$f2"); $ftp->quit;
where "$prefix"."$f2" expands to the local file on the webserver, as the cgi script writes the uploaded file to a temp location ( named $prefix$f2 ) then sends that to the ftp server.
Could anyone point me in the right direction? I've been grepping and hitting google/monks/perl.com/lugs.. etc. for a while now with no luck.
Thanks!In reply to NET::FTP truncates files by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |