1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

improved files identification

This commit is contained in:
Jb Lm 2022-03-31 14:55:45 +02:00
parent 6c109acdbe
commit 0d81740d09

11
app.php
View File

@ -232,12 +232,15 @@ $f3->route('GET /signature/@hash/pdf',
$originalFilename = null;
$layers = [];
foreach($files as $file) {
if (strpos($file, 'svg.pdf') === false) {
if (strpos($file, 'signe.pdf') !== false) {
continue;
}
if(strpos($file, 'svg.pdf') !== false) {
$layers[] = $targetDir.'/'.$file;
continue;
}
$original = $targetDir.'/'.$file;
$originalFilename = $file;
} else {
$layers[] = $targetDir.'/'.$file;
}
}
if (!$original) {
$f3->error(404);