FilamentF
Filament10mo ago
Batman

Fileupload delete image on filesystem (avatar)

I am using Breezy. The upload works as expected. When you click on the X to remove the avatar from your account it does remove the database entry. I am trying to figure out how to correctly delete the physical file as well.

->avatarUploadComponent(fn () => FileUpload::make('avatar_url')
                        ->directory('o-res/avatars')
                        ->disk('public')
                    )
Was this page helpful?