Skip to content

Commit 42c2665

Browse files
Merge pull request #51 from upgradelabs/main
Add disk and visibility configuration for avatars
2 parents 7e334fb + 0e4c3c7 commit 42c2665

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ use Joaopaulolndev\FilamentEditProfile\Pages\EditProfilePage;
114114
])
115115
```
116116

117+
If needed you can define the disk and visibility of the avatar image. In the config file add the following:
118+
119+
[config/filament-edit-profile.php](config/filament-edit-profile.php)
120+
121+
```php
122+
return [
123+
'disk' => 's3',
124+
'visibility' => 'public',
125+
];
126+
```
127+
128+
117129
## Profile Avatar
118130

119131
![Screenshot of avatar Feature](https://raw.githubusercontent.com/joaopaulolndev/filament-edit-profile/main/art/profile-avatar.png)

src/Livewire/EditProfileForm.php

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ public function form(Form $form): Form
4343
->label(__('filament-edit-profile::default.avatar'))
4444
->avatar()
4545
->imageEditor()
46+
->disk(config('filament-edit-profile.disk', 'public'))
47+
->visibility(config('filament-edit-profile.visibility', 'public'))
4648
->directory(filament('filament-edit-profile')->getAvatarDirectory())
4749
->rules(filament('filament-edit-profile')->getAvatarRules())
4850
->hidden(! filament('filament-edit-profile')->getShouldShowAvatarForm()),

0 commit comments

Comments
 (0)