© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
tbdev

FileUpload component - issue with delete uploaded file

I have a simple file upload component in my [Model]Resource:

return $form->schema([
                TextInput::make('title'),
                TextInput::make('slug'),
                FileUpload::make('avatar')
                    ->disk('s3')
                    ->directory($avatarPath),
                RichEditor::make('content'),
            ]);
return $form->schema([
                TextInput::make('title'),
                TextInput::make('slug'),
                FileUpload::make('avatar')
                    ->disk('s3')
                    ->directory($avatarPath),
                RichEditor::make('content'),
            ]);


This generally works fine – the file uploads to S3 and is saved in the database. However, when I click the delete button, I encounter the following error:

Filament\Forms\Components\BaseFileUpload::deleteUploadedFile(): Argument #1 ($fileKey) must be of type Closure, string given, called in /var/www/html/vendor/filament/forms/src/Concerns/SupportsFileUploadFields.php on line 15
Filament\Forms\Components\BaseFileUpload::deleteUploadedFile(): Argument #1 ($fileKey) must be of type Closure, string given, called in /var/www/html/vendor/filament/forms/src/Concerns/SupportsFileUploadFields.php on line 15


I'm using Laravel 11.

Can anyone help with this? 🥹
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

FileUpload component doesn't show uploaded image
FilamentFFilament / ❓┊help
3y ago
Displaying uploaded file to form component
FilamentFFilament / ❓┊help
3y ago
Images uploaded without the FileUpload component cannot be displayed.
FilamentFFilament / ❓┊help
2y ago