attachment location starts with http return itself

This commit is contained in:
xiaomlove
2025-05-26 19:18:45 +07:00
parent 9de0963595
commit 09f7387b24
+3
View File
@@ -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, '/'));
}