configurable disks

This commit is contained in:
2024-08-23 20:58:45 +03:00
parent c43c29eb14
commit a737c2d571
5 changed files with 30 additions and 35 deletions
+12 -2
View File
@@ -25,8 +25,18 @@ final class Channel
)
{
$this->lucentUrl = $url . "/lucent";
$this->filesUrl = $url . "/storage";
$this->previewTargetUrl = $url . "/". $previewTarget;
$this->filesUrl = $this->makeFilesUrl();
$this->previewTargetUrl = $url . "/" . $previewTarget;
}
private function makeFilesUrl(): string
{
return match (config("filesystems.disks.lucent.driver")) {
"s3" => config("filesystems.disks.lucent.endpoint") . "/" . config("filesystems.disks.lucent.bucket"),
"local" => $this->url . "/storage" . config("filesystems.disks.lucent.endpoint"),
};
}
}