Skip to content

Commit

Permalink
update photo storage
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 4, 2020
1 parent 6ac870f commit b304f4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HasProfilePhoto.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function updateProfilePhoto(UploadedFile $photo)
{
tap($this->profile_photo_path, function ($previous) use ($photo) {
$this->forceFill([
'profile_photo_path' => $photo->store(
'profile_photo_path' => $photo->storePublicly(
'profile-photos', $this->profilePhotoDisk()
),
])->save();
Expand Down Expand Up @@ -57,6 +57,6 @@ protected function defaultProfilePhotoUrl()
*/
protected function profilePhotoDisk()
{
return 'public';
return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : 'public';
}
}

0 comments on commit b304f4e

Please sign in to comment.