How to increase Max file upload size?

I am trying set file upload size limit to 800M.
FileUpload::make('download_url')
->disk('public')
->directory('videos')
->label('Video File')
->maxSize(819200) // 800 MB in KB
->preserveFilenames();
FileUpload::make('download_url')
->disk('public')
->directory('videos')
->label('Video File')
->maxSize(819200) // 800 MB in KB
->preserveFilenames();
But I am unable to upload a 750M file. I am getting following error. The mountedTableActionsData.0.download_url.d1b511bb-4c36-4261-8ea3-9389841af147 field must not be greater than 200000 kilobytes. Please suggest.
20 Replies
Matthew
Matthew3w ago
I have the same error It seems to be an issue with FileUpload component Someone needs to report it on github
Sujay Barma
Sujay BarmaOP3w ago
I fixed my issue by php artisan vendor:publish --tag=livewire:config
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => ['required', 'file', 'max:819200'],
...]
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => ['required', 'file', 'max:819200'],
...]
in config/livewire.php
Matthew
Matthew3w ago
Ahh, I see. Thanks what the hell? Yesterday it worked, today it doesnt
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => ['max:819200'],
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
],
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => ['max:819200'],
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
],
Am i still missing something?
Sujay Barma
Sujay BarmaOP3w ago
what's the error?
Matthew
Matthew3w ago
No description
Matthew
Matthew3w ago
In console:
No description
Sujay Barma
Sujay BarmaOP3w ago
What's the max size of the file you want upload? 800mb?
Matthew
Matthew3w ago
I want the max to be around 100mb, but I gave it 800 anyways just like you did The file I uploaded is 56MB as you can see WOW, wait I figured it out Its Octane's fault For some reason it wont let me upload large files plain serve works fine
bardolf_6969
bardolf_69693w ago
Also remember Livewire has a maximum file upload in the Livewire config as well
krekas
krekas3w ago
don't upload such large files...if you really need it make a custom upload with chunks
bardolf_6969
bardolf_69693w ago
there are settings to change that
Matthew
Matthew3w ago
How do I do that?
bardolf_6969
bardolf_69693w ago
it depends on which engine you chose Did you choose Swoole or Frankenphp?
Matthew
Matthew3w ago
swoole Im pretty sure its an issue with swoole
bardolf_6969
bardolf_69693w ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Matthew
Matthew3w ago
I have this in my logs [2024-11-17 09:37:46 #5311.0] WARNING Server::check_worker_exit_status(): worker(pid=5361, id=5) abnormal exit, status=0, signal=11
bardolf_6969
bardolf_69693w ago
No description
bardolf_6969
bardolf_69693w ago
Open Swoole PHP
OpenSwoole Server Configuration | Open Swoole PHP
Documentation of Open Swoole, Open Swoole Wiki, Open Swoole Tutorial
bardolf_6969
bardolf_69693w ago
but package_max_length limits your max upload size Don't forget the Livewire upload limit as that is the one I ALWAYS forget 🙂
Matthew
Matthew3w ago
Thank you! 🙂 This worked I realized that I actually did add this, I just forgot to increase the value of package_max_length 😅
Want results from more Discord servers?
Add your server