#!/usr/bin/perl -w use CGI(); my $query = new CGI; $upload_dir = "/tmp"; print "Content-type: text/html\n\n"; print "\n"; print "BFT File Upload\n"; print "\n"; print "Processing Uploaded File...
"; $sscfFile = $query->param('sscfFile') || ''; if ($sscfFile =~ /([\w .-]+)$/i) { #strip off path stuff $sscfFile = $1; } else { error("Could not generate filename $!"); } open (UPLOADFILE, ">$upload_dir/$sscfFile") || (error("Cannot open file $upload_dir/$sscfFile $!")); binmode UPLOADFILE; while ($bytesread=read($sscfFile,$buffer,1024)) { $totalbytes += $bytesread; print UPLOADFILE $buffer; } close UPLOADFILE; print "";