I'm running a forum on a debian box and all of a sudden my uploads don't
seem to be working anymore.
The code for the upload is the folowing:
sub _save_file{
my ($self, $file_hdr, $file_name) = @_;
my ($ret, $bytesread, $data);
open (SAVE, ">$config->{'file_path'}/$file_name") or die "an error
occured:
while ($bytesread = read($file_hdr,$data,1024)) {
print SAVE $data;
}
close SAVE;
$ret = -s "$config->{'file_path'}/$file_name";
return $ret;
Is there something wrong with this code?
Because I'm getting files with a filesize of 0 kb instead of the real
filesize.