mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 04:04:45 +02:00
Only allow image/png
mimetype for Avatar (#1246)
This commit is contained in:
parent
702a6bb750
commit
8221c80ec2
@ -130,6 +130,7 @@ class EditProfile extends BaseEditProfile
|
|||||||
FileUpload::make('avatar')
|
FileUpload::make('avatar')
|
||||||
->visible(fn () => config('panel.filament.avatar-provider') === 'local')
|
->visible(fn () => config('panel.filament.avatar-provider') === 'local')
|
||||||
->avatar()
|
->avatar()
|
||||||
|
->acceptedFileTypes(['image/png'])
|
||||||
->directory('avatars')
|
->directory('avatars')
|
||||||
->getUploadedFileNameForStorageUsing(fn () => $this->getUser()->id . '.png'),
|
->getUploadedFileNameForStorageUsing(fn () => $this->getUser()->id . '.png'),
|
||||||
]),
|
]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user