FilamentF
Filament2y ago
GDG

Uploading font files .ttf and .otf

Has anybody been able to upload .ttf or .otf font files using FileUpload?

I have even tried the following ->acceptedFileTypes(['application/x-font-ttf', 'font/ttf', '.ttf']) but I constantly get "File of Invalid Type".

Not doing anything crazy with the component and images etc work just fine.

Forms\Components\FileUpload::make('header_font_file')->directory('fonts')->visibility('public')->acceptedFileTypes(['application/x-font-ttf', 'font/ttf', '.ttf'])
Was this page helpful?