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:
parent
6c109acdbe
commit
0d81740d09
11
app.php
11
app.php
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user