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()
|
public function getCloudLink()
|
||||||
{
|
{
|
||||||
|
$relativeLink = ltrim($this->getRelativeLinkFor(), '/');
|
||||||
|
|
||||||
return
|
return
|
||||||
sprintf("%s/%s%s",
|
sprintf("%s/%s/%s",
|
||||||
Config::get("cloudstorage.base_url") ,
|
Config::get("cloudstorage.base_url") ,
|
||||||
Config::get("cloudstorage.assets_container"),
|
Config::get("cloudstorage.assets_container"),
|
||||||
$this->getRelativeLinkFor());
|
$relativeLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -287,12 +289,14 @@ class File extends SilverstripeBaseModel
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getCloudLinkForImages(string $imageRelativePath):string {
|
public static function getCloudLinkForImages(string $imageRelativePath):string {
|
||||||
|
$imageRelativePath = ltrim($$imageRelativePath, '/');
|
||||||
|
|
||||||
|
|
||||||
return
|
return
|
||||||
sprintf("%s/%s%s",
|
sprintf("%s/%s/%s",
|
||||||
Config::get("cloudstorage.base_url") ,
|
Config::get("cloudstorage.base_url") ,
|
||||||
Config::get("cloudstorage.images_container"),
|
Config::get("cloudstorage.images_container"),
|
||||||
$imageRelativePath
|
$imageRelativePath);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,7 +288,7 @@ final class OAuth2SpeakersApiTest extends ProtectedApiTest
|
|||||||
{
|
{
|
||||||
$params = [
|
$params = [
|
||||||
|
|
||||||
'id' => 23,
|
'id' => 26,
|
||||||
'page' => 1,
|
'page' => 1,
|
||||||
'per_page' => 10,
|
'per_page' => 10,
|
||||||
'order' => '+id'
|
'order' => '+id'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user