From 435340727bd4139f1c2a62f82fa3caf33fd203f6 Mon Sep 17 00:00:00 2001 From: duakayra Date: Tue, 11 Aug 2026 15:21:25 +0200 Subject: [PATCH] support Symfony validation file type constraint for unsaved attachments --- lib/midcom/db/attachment.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/midcom/db/attachment.php b/lib/midcom/db/attachment.php index 3d4a3f9be..885c85157 100644 --- a/lib/midcom/db/attachment.php +++ b/lib/midcom/db/attachment.php @@ -254,10 +254,15 @@ public function stat() return stat($path); } + public function __toString() : string + { + return $this->get_path(); + } + public function get_path() : string { if (!$this->id) { - return ''; + return $this->location; } return (new blob($this->__object))->get_path(); }