diff --git a/src/LfmStorageRepository.php b/src/LfmStorageRepository.php index 9753892d..69a28596 100644 --- a/src/LfmStorageRepository.php +++ b/src/LfmStorageRepository.php @@ -46,6 +46,12 @@ public function url($path) $config = $this->disk->getConfig(); if (key_exists('driver', $config) && $config['driver'] == 's3') { + // Check if custom URL is configured (for public bucket with custom domain) + if (!empty($config['url'])) { + return $this->disk->url($path); + } + + // Use temporary URL for private buckets without custom domain $duration = $this->helper->config('temporary_url_duration'); return $this->disk->temporaryUrl($path, now()->addMinutes($duration)); } else {