clean /tmp files

This commit is contained in:
qo-op 2021-01-25 01:30:34 +01:00
parent 4683e5c350
commit 03f4fd4928
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ montage /tmp/g1billet/${UNIQID}/*.jpg -tile 2x3 -geometry 964x459 /tmp/g1billet/
# <!-- <policy domain="coder" rights="none" pattern="PDF" /> -->
# CLEANING TEMP FILES
# rm -Rf /tmp/g1billet/${UNIQID}
rm -Rf /tmp/g1billet/${UNIQID}
# ALLOWS ANY USER TO DELETE
chmod 777 /tmp/g1billet/${UNIQID}.pdf

View File

@ -14,7 +14,7 @@ if (file_exists($attachment_location)) {
header("Content-Length:".filesize($attachment_location));
header("Content-Disposition: attachment; filename=".$timestamp.".pdf");
readfile($attachment_location);
// unlink("/tmp/g1billet/".$timestamp.".pdf");
unlink("/tmp/g1billet/".$timestamp.".pdf");
die();
} else {
die("Error: File not found.");