Skip to content

Commit b304f4e

Browse files
committedSep 4, 2020
update photo storage
1 parent 6ac870f commit b304f4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎src/HasProfilePhoto.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function updateProfilePhoto(UploadedFile $photo)
1717
{
1818
tap($this->profile_photo_path, function ($previous) use ($photo) {
1919
$this->forceFill([
20-
'profile_photo_path' => $photo->store(
20+
'profile_photo_path' => $photo->storePublicly(
2121
'profile-photos', $this->profilePhotoDisk()
2222
),
2323
])->save();
@@ -57,6 +57,6 @@ protected function defaultProfilePhotoUrl()
5757
*/
5858
protected function profilePhotoDisk()
5959
{
60-
return 'public';
60+
return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : 'public';
6161
}
6262
}

0 commit comments

Comments
 (0)
Please sign in to comment.