From: Rob H. <for...@us...> - 2002-01-18 07:37:37
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv29108/lib/SandWeb Modified Files: File.pm Log Message: file upload now works from the file menu. it probably does NOT work from the browse menu (yet). Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -U2 -r1.29 -r1.30 --- File.pm 2002/01/07 07:14:41 1.29 +++ File.pm 2002/01/18 07:37:33 1.30 @@ -118,4 +118,29 @@ } +sub upload { + my $self = shift; + my %args = @_; + my $location = $self->{'location'}; + my $filename = $self->{'filename'}; + my $log = $self->{'log_obj'}; + + my $filehandle = $args{'filehandle'}; + +open UPLOADFILE, "> $location/$filename"; + +while ( <$filehandle> ) +{ + print UPLOADFILE; +} + +close UPLOADFILE; + +print "content-type:text/html\n\n"; +print "all done!"; +print "$filehandle"; + +exit 1; +} + sub download { my $self = shift; |