1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +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');
}