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

13
app.php
View File

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