Level 4
Fixed myself with
->acceptedFileTypes([
'video/mp4',
'video/quicktime', // for .mov files
'video/x-msvideo', // for .avi files
'video/x-matroska', // for .mkv files
'video/x-ms-wmv', // for .wmv files
])
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I have the following I a schema in filament 4:
FileUpload::make('video_file')
->required()
->label('Video File')
->multiple()
->disk('private')
->directory('')
->acceptedFileTypes(['mp4', 'mov', 'avi', 'mkv', 'wmv'])
->maxSize(2097152),
Whenever I tried to load an .mp4 file I got a an error in the form (not yet submitted): File of invalid type. Expects mp4, mov etc etc.
Thinking it was a bad file I tried with 7-8 files. All of them the same problem.
Thanks, Simon
Please or to participate in this conversation.