Add support for handling /files/ requests and temp file attachments in file_server.php

- Updated `file_server.php` to mark files with `temp_file_` in their name as attachments.
- Enhanced routing logic in `index.php` to load `file_server.php` for `/files/` requests.
This commit is contained in:
Jeppe Bundgaard
2025-09-22 17:29:05 +02:00
parent 9d47d98cd6
commit 09fbbc11bb
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -18,6 +18,10 @@ if (preg_match('/\.pdf$/', $file)) {
$isAttachment = true;
}
}
// Check if the file is an attachment
if (str_contains($file, 'temp_file_')) {
$isAttachment = true;
}
if ($isPDF && $isPDFStore) {
$file = str_replace('/modules/washcertificates/output/certificates/', '', $file);