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
13
app.php
13
app.php
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user