RichEditor - how to limit uploaded images max size?

https://filamentphp.com/docs/2.x/forms/fields#rich-editor a user uploaded several images inside the rich editor. 5000 x 5000 images lol. ive been looking into the docs how to limit uploaded images max size, but im not finding how to. also tried to dig in the RichEditor's methods
RichEditor::make('rich_text')
->required()
// ->max ??
// ->maxLength( ??
RichEditor::make('rich_text')
->required()
// ->max ??
// ->maxLength( ??
3 Replies
ericmp #2
ericmp #2OP13mo ago
is possible? update: ive been testing out and when i insert an image inside the rich editor, it automatically stores it in my storage folder. i want to validate that the images have a max size before storing them but idk how to do it
toeknee
toeknee13mo ago
I don't think it is possible. You could look at a custom validation rule maybe which checks the submitted data with the editor?
ericmp #2
ericmp #2OP13mo ago
thanks, ill try to do it, if its possible to do
Want results from more Discord servers?
Add your server