Okay, I'm totally stumped. I'm trying to upload a file using a browser and a file upload field and saving the file to my server. The code is as follows:

my $filename = $cgiobj->param('uploaded_file');
my $fh = $cgiobj->upload('uploaded_file');
open (OUTFILE, ">../featImages/$filename") or die "Can't open featImages $filename $!";
while (<$fh>) {
print OUTFILE <$fh> or die "Can't print to OUTFILE $!";
}
close OUTFILE;


The file will be binary. I can get it to print out to STDOUT just fine but I don't want it in my webpage, I want it in the featImages directory.

Remember, I'm still a newbie so please be gentle. If you are a crabby person, please don't reply to this.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to