© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
4 replies
Mahmoud Elshiha

increase FileUpload Size limit up to 50MB !

What I am trying to do:
- i want to increase Filament FileUpload file size to be 50MB but it only allows up to 2MB not matter what i do...

What I did:
- i have configured my php.ini to allow large files with :

php artisan tinker
> ini_get('upload_max_filesize')
= "50M"

> ini_get('post_max_size')
= "50M"
php artisan tinker
> ini_get('upload_max_filesize')
= "50M"

> ini_get('post_max_size')
= "50M"


- i have edited livewire config with :
'temporary_file_upload' => [
        'disk' => null,        
        'rules' => ['file', 'max:51200'], // <---- this line 
        'directory' => null,   
        'middleware' => null,  
        'preview_mimes' => [   
            'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
            'mov', 'avi', 'wmv', 'mp3', 'm4a',
            'jpg', 'jpeg', 'mpga', 'webp', 'wma',
        ],
        'max_upload_time' => 5, 
        'cleanup' => true, 
    ],
'temporary_file_upload' => [
        'disk' => null,        
        'rules' => ['file', 'max:51200'], // <---- this line 
        'directory' => null,   
        'middleware' => null,  
        'preview_mimes' => [   
            'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
            'mov', 'avi', 'wmv', 'mp3', 'm4a',
            'jpg', 'jpeg', 'mpga', 'webp', 'wma',
        ],
        'max_upload_time' => 5, 
        'cleanup' => true, 
    ],


- i have added the fileUpload config in the Resource :
  Forms\Components\FileUpload::make('image')
                    ->label(__('filament.Image'))
                    ->image()
                    ->maxSize(51200)
                    ->required(),
  Forms\Components\FileUpload::make('image')
                    ->label(__('filament.Image'))
                    ->image()
                    ->maxSize(51200)
                    ->required(),


My issue/the error:
The data.image.b104df8a-ca0f-45c6-8454-cbf7c0127122 failed to upload.
The data.image.b104df8a-ca0f-45c6-8454-cbf7c0127122 failed to upload.
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ImportAction - file size validation error - Need to increase maxSize limit
FilamentFFilament / ❓┊help
6mo ago
How to increase maximum file uploader size
FilamentFFilament / ❓┊help
14mo ago
How to increase Max file upload size?
FilamentFFilament / ❓┊help
15mo ago
FileUpload max size validation isnt working
FilamentFFilament / ❓┊help
15mo ago