From: Rob H. <for...@us...> - 2001-12-20 23:08:02
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv29745/bin Modified Files: sandweb.cgi Log Message: file download is still broken, but it at least detects the proper mime type and asks if you want to download it.. :) hmm.. both download and upload should be public methods in the File class, that'd be rad. Then we could just do like - my $file = SandWeb::File->new( filename => "/this/file.txt" ); $file->download(); of $file->upload(); if it was a new file. Rad. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.100 retrieving revision 1.101 diff -U2 -r1.100 -r1.101 --- sandweb.cgi 2001/12/20 20:29:41 1.100 +++ sandweb.cgi 2001/12/20 23:05:57 1.101 @@ -489,5 +489,5 @@ $log->debug("viewing file : $filename"); if ( $file->get_file_type() ne "Text" ) { - $log->debug("User wants to view non-text file."); + $log->debug("User wants to view non-text file : $filename"); set_error("This does not appear to be a text file."); browse_menu( @@ -502,4 +502,5 @@ MENU => 'view_file', PROGNAME => $progname, + FILENAME => "$filename", CONTENT => "@tmp", ); |