1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-22 07:36:37 +02:00

cle de fichier aléatoire

This commit is contained in:
Vincent LAURENT 2021-09-21 19:11:06 +02:00
parent 816ce45e56
commit 00a4e1aa25

View file

@ -32,7 +32,7 @@ $f3->route('POST /upload',
if(!$valid) {
continue;
}
$key = md5_file($file);
$key = substr(hash('sha256', hash_file('sha256', $file).uniqid()), 0, 24);
rename($file, $f3->get('UPLOADS').'/'.$key.'.pdf');
}