From 09f7387b24be3602b9f474eb3b1f41ee6a40d1d8 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 26 May 2025 19:18:45 +0700 Subject: [PATCH] attachment location starts with http return itself --- nexus/Attachment/Storage.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nexus/Attachment/Storage.php b/nexus/Attachment/Storage.php index b949a9ae..28badbd9 100644 --- a/nexus/Attachment/Storage.php +++ b/nexus/Attachment/Storage.php @@ -44,6 +44,9 @@ abstract class Storage { public function getImageUrl(string $location): string { + if (str_starts_with($location, "http://") || str_starts_with($location, "https://")) { + return $location; + } return sprintf('%s/%s', trim($this->getBaseUrl(), '/'), trim($location, '/')); }