Skip to content

Commit a0d216f

Browse files
authored
路径命名可为空 (#364)
1 parent b8471f2 commit a0d216f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Models/Image.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function url(): Attribute
174174
if ($this->group?->configs->get(GroupConfigKey::IsEnableOriginalProtection)) {
175175
return asset("{$this->key}.{$this->extension}");
176176
} else {
177-
return rtrim($this->strategy?->configs->get('url'), '/').'/'.$this->pathname;
177+
return rtrim($this->strategy?->configs->get('url'), '/').'/'.ltrim($this->pathname, '/');
178178
}
179179
});
180180
}

0 commit comments

Comments
 (0)