Only allow image/png mimetype for Avatar (#1246)

This commit is contained in:
MartinOscar 2025-04-13 02:27:36 +02:00 committed by GitHub
parent 702a6bb750
commit 8221c80ec2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,6 +130,7 @@ class EditProfile extends BaseEditProfile
FileUpload::make('avatar')
->visible(fn () => config('panel.filament.avatar-provider') === 'local')
->avatar()
->acceptedFileTypes(['image/png'])
->directory('avatars')
->getUploadedFileNameForStorageUsing(fn () => $this->getUser()->id . '.png'),
]),