Skip to content

Commit

Permalink
Merge pull request #14 from netlogix/bugfix/baseuri-for-static-resources
Browse files Browse the repository at this point in the history
BUGFIX: Fix setting base uri for static resources
  • Loading branch information
kdambekalns authored Jan 10, 2018
2 parents 019f5c0 + 06efcf5 commit c480fef
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 @@ -242,7 +242,11 @@ public function publishCollection(CollectionInterface $collection, callable $cal
*/
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 c480fef

Please sign in to comment.