in reply to RE: Net::FTP and param()
in thread Net::FTP and param()

I just found out you should use the new upload() function. This still didn't fix the problem, however and I tried your solution, too.

Replies are listed 'Best First'.
RE: Actually...
by t0mas (Priest) on Aug 15, 2000 at 11:12 UTC
    Try with at temporary file:
    my $C = new CGI; my $filehandle = $C->upload('file'); open OUTFILE, ">/tmp/tmpfile" or die "Can't create: $!"; while (<$filehandle>) {print OUTFILE;} close OUTFILE or die "Can't close: $!";
    and then the ftp stuff with $ftp->put('/tmp/tmpfile').
    This will of cause not be good enough in a multi-user environment, where you'll need to handle simultaneous uploads. You will have to create a unique temporary name, perhaps with File::MkTemp.

    /brother t0mas