hi all of you !
I have a question regarding the files uploaded with PHP runner. I read carefully the explanation in the manual and made it work.
Actually when I am uploading an image/picture on Jpg format the file name is well transformed in the database but the file loaded on the server keeps the same name as the one shown before download is completed.
find attached the code entered in the function Before add.
Quote
function BeforeAdd(&$values,&$message,$inline)
{
$filesize=$_FILES["file_filemime"]["size"];
if($filesize>6000000 or $filesize<100000)
{
$values["filemine"]="";
$message = "<div class=message><<< la taille de votre image doit être comprise entre 100 ko et 6 Mo max >>></div>";
return false;
}
global $files_move;
$today=date("j.m.Y-H_i_s");
$nom= $values["id_piges"]."Pige".$values["id_pigiste"]."_pigistedu".$today;
foreach( $files_move as $key=>$val)
{
if($val[0]==$_FILES["file_filemime"]["tmp_name"])
// $files_move[$key][1] = "files/photos/".$nom.".jpg";
}
$values["filemime"] = $nom.".jpg";
return true;
}
I am wondering why the file saved on teh server folder is not renamed while the name in the database is well transformed
Looking for your idea or suggestion..