I have a table `docs` where I'm uploading files to a MySql database. The fields are `id`, `title`, `type`,`author`, `version`, `description`, `content`, `check_out`, `filename`, `filesize`,`date` (files are stored in 'content' - type BLOB).
I want to complete automatically the filesize field when a new record is added.
I used Before record added but it doesn't seems that works:
I tried followings:
$values["filesize"]=$_FILES["filename"]["size"];
$values["filesize"]=filesize($values["filename"]);
$values["filesize"]=filesize($_GET["filename"]);
Any solution?
Thank you,
Lucian