Utilisation de la fonction tempnam pour les noms de fichier de l'action

image2svg
This commit is contained in:
Vincent LAURENT 2021-11-11 09:28:13 +01:00
parent a7076e962a
commit 57b8d8d973
1 changed files with 2 additions and 2 deletions

View File

@ -85,9 +85,9 @@ $f3->route('POST /image2svg',
}
return true;
}, true, function($fileBaseName, $formFieldName) {
}, true, function($fileBaseName, $formFieldName) use ($f3) {
return substr(hash('sha256', $fileBaseName.uniqid().mt_rand()), 0, 24).strrchr($fileBaseName, '.');
return basename(tempnam($f3->get('UPLOADS'), 'pdfsignature_image2svg'));
});
$imageFile = null;