From e3df5c02bf09ec5a47d03ca1957b585c57860e8f Mon Sep 17 00:00:00 2001 From: ThaMunsta Date: Wed, 25 Sep 2024 22:57:31 -0400 Subject: [PATCH] Update expenses.php Downloaded filename was hardcoded and assumed only ever PDF would be uploaded and downloads any jpg/png as a PDF filename. Fix takes into account the database filename and extension and updated iconography for more general file indication. --- expenses.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/expenses.php b/expenses.php index b84328361..41023100d 100644 --- a/expenses.php +++ b/expenses.php @@ -293,7 +293,9 @@ if (empty($expense_receipt)) { $receipt_attached = ""; } else { - $receipt_attached = ""; + $path_info = pathinfo($expense_receipt); + $ext = $path_info['extension']; + $receipt_attached = ""; } ?>