Skip to content

Commit 8d84ec3

Browse files
scott graysonscott grayson
authored andcommitted
fix: remove acceptedFileTypes to properly allow all file types
- Remove acceptedFileTypes method entirely from FileUpload components - This is the correct way to allow all file types in Filament - Fixes validation error 'must be a file of type: .'
1 parent 30b019b commit 8d84ec3

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src/Resources/LibraryItemResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public static function fileForm(Schema $schema): Schema
7070
\Filament\Forms\Components\FileUpload::make('file')
7171
->label('Upload File')
7272
->required()
73-
->acceptedFileTypes([]) // Allow all file types
7473
->maxSize(10240) // 10MB
7574
->disk('public')
7675
->directory('library-files')

src/Resources/Pages/ListLibraryItems.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ protected function getHeaderActions(): array
7777
FileUpload::make('file')
7878
->label('Upload File')
7979
->required()
80-
->acceptedFileTypes([]) // Allow all file types
8180
->maxSize(10240) // 10MB
8281
->disk('public')
8382
->directory('library-files')

0 commit comments

Comments
 (0)