From be2d9a794cfaf1d2a5355633a9e87dabaa650ad9 Mon Sep 17 00:00:00 2001 From: Jb Lm Date: Thu, 31 Mar 2022 14:59:48 +0200 Subject: [PATCH] deleting generated file from server --- app.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.php b/app.php index 925cc03..9fc0cd9 100644 --- a/app.php +++ b/app.php @@ -255,6 +255,11 @@ $f3->route('GET /signature/@hash/pdf', shell_exec(sprintf("pdftk %1\$s multibackground %2\$s output %3\$s && mv %3\$s %2\$s", $layers[$i], $newFile, str_replace('_signe.pdf', '_tmp_signe.pdf', $newFile))); } Web::instance()->send($newFile, null, 0, TRUE, $newFilename); + + if($f3->get('DEBUG')) { + return; + } + unlink($newFile); } );