Skip to content

Commit

Permalink
[BUGFIX] Fix setting base uri for static resources
Browse files Browse the repository at this point in the history
This change allows setting a base uri for static resources
like the existing behaviour with base uri for persistent
resources.
  • Loading branch information
liwo committed Jun 9, 2017
1 parent 5d14875 commit 06efcf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Classes/S3Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

/**
Expand Down

0 comments on commit 06efcf5

Please sign in to comment.