From 37877cd645ea1c51f4fb5d0ac4a80332b22a3f23 Mon Sep 17 00:00:00 2001 From: Ahmad Mayahi Date: Sat, 30 Jan 2021 13:04:44 +0100 Subject: [PATCH 1/3] Add profile_photo_disk config option --- config/jetstream.php | 13 +++++++++++++ src/HasProfilePhoto.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/config/jetstream.php b/config/jetstream.php index d2bb8cdcf..ca33061ce 100644 --- a/config/jetstream.php +++ b/config/jetstream.php @@ -49,4 +49,17 @@ Features::accountDeletion(), ], + /* + |-------------------------------------------------------------------------- + | Profile Photo Disk + |-------------------------------------------------------------------------- + | + | Here you may specify the default filesystem disk that should be used by + | Jetstream to store the profile photos. + | By default, the s3 disk will be used to store profile photos when your + | application is running within Laravel Vapor. + | + */ + + 'profile_photo_disk' => 'public', ]; diff --git a/src/HasProfilePhoto.php b/src/HasProfilePhoto.php index 33e3a4132..d87e5c4b9 100644 --- a/src/HasProfilePhoto.php +++ b/src/HasProfilePhoto.php @@ -76,6 +76,6 @@ protected function defaultProfilePhotoUrl() */ protected function profilePhotoDisk() { - return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : 'public'; + return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('jetstream.profile_photo_disk'); } } From bff184346b74bbcde9bb5dd1d4ff4fd190347d01 Mon Sep 17 00:00:00 2001 From: Ahmad Mayahi Date: Sat, 30 Jan 2021 13:14:48 +0100 Subject: [PATCH 2/3] Add public as a default value --- src/HasProfilePhoto.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HasProfilePhoto.php b/src/HasProfilePhoto.php index d87e5c4b9..d5bb4ced8 100644 --- a/src/HasProfilePhoto.php +++ b/src/HasProfilePhoto.php @@ -76,6 +76,6 @@ protected function defaultProfilePhotoUrl() */ protected function profilePhotoDisk() { - return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('jetstream.profile_photo_disk'); + return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('jetstream.profile_photo_disk', 'public'); } } From e6a23e40e0a2d9f54e08334260e9c53ed1e47b46 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 30 Jan 2021 13:54:29 -0600 Subject: [PATCH 3/3] Update jetstream.php --- config/jetstream.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/config/jetstream.php b/config/jetstream.php index ca33061ce..d2bb8cdcf 100644 --- a/config/jetstream.php +++ b/config/jetstream.php @@ -49,17 +49,4 @@ Features::accountDeletion(), ], - /* - |-------------------------------------------------------------------------- - | Profile Photo Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used by - | Jetstream to store the profile photos. - | By default, the s3 disk will be used to store profile photos when your - | application is running within Laravel Vapor. - | - */ - - 'profile_photo_disk' => 'public', ];