From 02cea20edc56ba2c12ed3f8773c5852d092a05ab Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 14:16:28 +0000 Subject: [PATCH 1/2] Initial plan From f5caab1b63404bda576d514752f4464d47b8fdad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 14:21:03 +0000 Subject: [PATCH 2/2] Fix File constructor to use path instead of filetype Co-authored-by: busgurlu <1284742+busgurlu@users.noreply.github.com> --- src/Controller/AttachmentsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/AttachmentsController.php b/src/Controller/AttachmentsController.php index 2839583..a3bfad3 100644 --- a/src/Controller/AttachmentsController.php +++ b/src/Controller/AttachmentsController.php @@ -273,7 +273,7 @@ public function file($id, $name = null) if (!file_exists($attachment->path)) { throw new \Exception("File {$attachment->path} cannot be read."); } - $file = new File($attachment->filetype); + $file = new File($attachment->path); $response = $this->response->withFile($attachment->path, ['download' => false, 'name' => $attachment->filename]) @@ -297,7 +297,7 @@ public function download($id, $name = null) if (!file_exists($attachment->path)) { throw new \Exception("File {$attachment->path} cannot be read."); } - $file = new File($attachment->filetype); + $file = new File($attachment->path); $response = $this->response->withFile($attachment->path, ['download' => true, 'name' => $attachment->filename])