F
Filament3mo 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'),
]);
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? 🥹
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server