#No synthesizer found for key: "" on FileUpload

13 messages · Page 1 of 1 (latest)

broken hemlock
#

Hello I just started filament and laravel one week ago, dans I'm facing this error when I try to upload a file using FileUpload.

this is my code :
Forms\Components\FileUpload::make("{$eye}_pdf") ->label('Fichier PDF') ->directory('patients') ->hidden(fn ($get) => !self::isFieldVisible($eye, 'pdf', $get)),

Thank you for your help

#

I also change the disk in config to local instead of public

still portal
#

remove the {eye} from the file name does that help?

It\s usually due to the default value of the property however, needing to be null not ''

broken hemlock
#

yes it fixes it, thanks for your help, I'll find another way to put this variable

still portal
#
Forms\Components\FileUpload::make($eye."_pdf")
broken hemlock
#

Nope it doesn't work

#

Same error as the beginning

still portal
#

Then $eye is not defined properly. try

Forms\Components\FileUpload::make(\Str::slug($eye)."_pdf")
broken hemlock
#

I have this :

->tabs([
self::generateEyeTab('left'),
self::generateEyeTab('right'),
])

with :

protected static function generateEyeTab(string $eye): Forms\Components\Tabs\Tab

I don't know if it's the right way to do it

#

In my generateEyeTab I have then my FileUpload

still portal
#

I dunno I'd need to see the whole code that renders the FileUpload

broken hemlock
still portal
#

looks like it should be good tbh