How can I get file size in perl before uploading it?
Posted
by zeina
on Stack Overflow
See other posts from Stack Overflow
or by zeina
Published on 2010-04-26T07:59:07Z
Indexed on
2010/04/26
8:03 UTC
Read the original article
Hit count: 203
I want to get file size I'm doing this:
my $filename=$query->param("upload_file");
my $filesize = (-s $filename) ;
print "Size: $filesize ";
Yet it is not working.Note that I did not upload the file. I want to check its size before uploading it. so to limit it to max of 1 MB.
© Stack Overflow or respective owner