This topic is locked

Checking Image Size

9/22/2009 12:56:53 PM
PHPRunner General questions
S
Stuckshutter author

I have copied in the code from the Help screen in Runner 5.1 build 2503 as follows:
// check if file size is too large

$filesize=$_FILES["file_FieldName"]["size"];

if($filesize>32000) // if file size is greater than 32kb

{ $values["FieldName"]="";

$message = "<div class=message><<< File size is too big - 30K max >>></div>";

return false;}
It affects only the EDIT page and the event is placed in the "Before record updated" section of "Edit page"
I want to limit the size file that can be uploaded but this code is not catching files sizes far larger than the limit.
Can someone help me out on this one.... Looks like it should be working.... but is not.
Thanks for the help.