I use VTK2
If you create a form with a file field. use the server validation. use to check the FILE-SIZE you can find it under the file-field.
check it against NUMBER, use intrenational and zero decimals. for 500KB you need to set max to 500000.
here is the my VTK2 line
$WAFV_Errors .= WAValidateNM(((isset($_FILES["imageName"]))?$_FILES["imageName"]["size"]:"") . "",0,1500000,0," ,",true,5);
I hope that helps.
I already wished to have that limit of file-size and image size back in the DFP2 like it was in DFP1, in this case its a step back.