From 396848b20bc5e6d16fe5fb6853ead6e1c4054925 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 1 Aug 2019 22:35:39 -0600 Subject: [PATCH] Update Media, Profile models, fix S3 urls --- app/Media.php | 4 ++-- app/Profile.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Media.php b/app/Media.php index 499d95b61..8c3de944b 100644 --- a/app/Media.php +++ b/app/Media.php @@ -34,10 +34,10 @@ class Media extends Model $url = $this->remote_url; } else { $path = $this->media_path; - $url = $this->cdn_url ?? Storage::url($path); + $url = $this->cdn_url ?? config('app.url') . Storage::url($path); } - return url($url); + return $url; } public function thumbnailUrl() diff --git a/app/Profile.php b/app/Profile.php index e46bedeed..e01ad368b 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -140,7 +140,7 @@ class Profile extends Model $version = hash('sha256', $avatar->change_count); $path = "{$path}?v={$version}"; - return url(Storage::url($path)); + return config('app.url') . Storage::url($path); }); return $url;