FilamentF
Filament16mo ago
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'),
            ]);


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


I'm using Laravel 11.

Can anyone help with this? 🥹
image.png
Was this page helpful?