fileAttachmentsAcceptedFileTypes and fileAttachmentsMaxSize methods don't exist

Hello, currently I am building a article CRUD using Filament 4. I already follow this documentation, but I have this error. https://filamentphp.com/docs/4.x/forms/rich-editor#validating-uploaded-images I have checked Filament\Forms\Components\RichEditor. It has use Concerns\HasFileAttachments which has function fileAttachmentsAcceptedFileTypes() and fileAttachmentsMaxSize() Code:
RichEditor::make('body')
->fileAttachmentsAcceptedFileTypes([
'image/png',
'image/jpeg',
'image/webp',
])
->required()
->columnSpanFull()
->fileAttachmentsDisk('public')
->fileAttachmentsDirectory('attachments')
->fileAttachmentsVisibility('public')
->fileAttachmentsMaxSize(config('uploads.image.max_size_kb'))
->extraAttributes([
'style' => 'min-height: 300px; max-height: 500px; overflow-y: auto;'
]),
RichEditor::make('body')
->fileAttachmentsAcceptedFileTypes([
'image/png',
'image/jpeg',
'image/webp',
])
->required()
->columnSpanFull()
->fileAttachmentsDisk('public')
->fileAttachmentsDirectory('attachments')
->fileAttachmentsVisibility('public')
->fileAttachmentsMaxSize(config('uploads.image.max_size_kb'))
->extraAttributes([
'style' => 'min-height: 300px; max-height: 500px; overflow-y: auto;'
]),
Do you have any solution?
No description
No description
No description
1 Reply
Dennis Koch
Dennis Koch2mo ago
What's the actual Filament version? php artisan about --only=filament

Did you find this page helpful?