From 06efcf5cfe07ab15429b7497d0238191bbab6729 Mon Sep 17 00:00:00 2001 From: Lienhart Woitok Date: Fri, 9 Jun 2017 16:49:43 +0200 Subject: [PATCH] [BUGFIX] Fix setting base uri for static resources This change allows setting a base uri for static resources like the existing behaviour with base uri for persistent resources. --- Classes/S3Target.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/S3Target.php b/Classes/S3Target.php index c3eafff..9a0a51a 100644 --- a/Classes/S3Target.php +++ b/Classes/S3Target.php @@ -231,7 +231,11 @@ public function publishCollection(CollectionInterface $collection) */ public function getPublicStaticResourceUri($relativePathAndFilename) { - return $this->s3Client->getObjectUrl($this->bucketName, $this->keyPrefix . $relativePathAndFilename); + if ($this->baseUri != '') { + return $this->baseUri . $relativePathAndFilename; + } else { + return $this->s3Client->getObjectUrl($this->bucketName, $this->keyPrefix . $relativePathAndFilename); + } } /**