Fixed trailing slash on pics urls
Change-Id: Id8a2e294eed3bbccedcaa65a6bc70b86f3ba7702
This commit is contained in:
parent
5e4c6c9e42
commit
66f67e08c9
@ -275,11 +275,13 @@ class File extends SilverstripeBaseModel
|
||||
*/
|
||||
public function getCloudLink()
|
||||
{
|
||||
$relativeLink = ltrim($this->getRelativeLinkFor(), '/');
|
||||
|
||||
return
|
||||
sprintf("%s/%s%s",
|
||||
sprintf("%s/%s/%s",
|
||||
Config::get("cloudstorage.base_url") ,
|
||||
Config::get("cloudstorage.assets_container"),
|
||||
$this->getRelativeLinkFor());
|
||||
$relativeLink);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -287,12 +289,14 @@ class File extends SilverstripeBaseModel
|
||||
* @return string
|
||||
*/
|
||||
public static function getCloudLinkForImages(string $imageRelativePath):string {
|
||||
$imageRelativePath = ltrim($$imageRelativePath, '/');
|
||||
|
||||
|
||||
return
|
||||
sprintf("%s/%s%s",
|
||||
sprintf("%s/%s/%s",
|
||||
Config::get("cloudstorage.base_url") ,
|
||||
Config::get("cloudstorage.images_container"),
|
||||
$imageRelativePath
|
||||
);
|
||||
$imageRelativePath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -288,7 +288,7 @@ final class OAuth2SpeakersApiTest extends ProtectedApiTest
|
||||
{
|
||||
$params = [
|
||||
|
||||
'id' => 23,
|
||||
'id' => 26,
|
||||
'page' => 1,
|
||||
'per_page' => 10,
|
||||
'order' => '+id'
|
||||
|
Loading…
x
Reference in New Issue
Block a user