F
Filamentβ€’11mo ago
.Sifat Kazi

The files.0 field must not be greater than 12288 kilobytes. (Forms\Components\FileUpload)

The files.0 field must not be greater than 12288 kilobytes. When I am trying to upload more then 12MB files its showing this error. How can I solve it ? Let me know if you need any details.
No description
Solution:
Hm Can you add this in the rules 'rules' => 'file|mimes:png,jpg,pdf|max:102400', // (100MB max, and only pngs, jpegs, and pdfs.)...
Jump to solution
24 Replies
Matthew
Matthewβ€’11mo ago
Thats weird. You are setting maxSize() to 1024 kb (1MB) Try and remove (or at least comment) the ->maxSize()
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
I tried without this ->maxSize() already. Same issue @Matthew . Actuall error is when I am uploading the file. http://127.0.0.1:8000/livewire/upload-file When I drop any file into the dropzone. Its start uploading. Then when uploading completed 100% its throwing an error response that is The files.0 field must not be greater than 12288 kilobytes. Do you have any idea, How can I disable this validation?
toeknee
toekneeβ€’11mo ago
Do not double post. #βœ…β”Šrules
Matthew
Matthewβ€’11mo ago
Maybe the max size in your php.ini Its the php configuration essentially
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
No its a validation error. php.ini set 2000MB
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
No description
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
No description
Matthew
Matthewβ€’11mo ago
Just shooting a shot Can you show this in your livewire config?
Matthew
Matthewβ€’11mo ago
No description
Matthew
Matthewβ€’11mo ago
Maybe there are validation rules there
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
No description
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
This is how its looking brother @Matthew
Solution
Matthew
Matthewβ€’11mo ago
Hm Can you add this in the rules 'rules' => 'file|mimes:png,jpg,pdf|max:102400', // (100MB max, and only pngs, jpegs, and pdfs.)
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
Thank you brother, This one worked.
No description
Matthew
Matthewβ€’11mo ago
Livewire will validate ALL temporary file uploads with the following rules: file|max:12288 by default
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
Get it now. was my first time using filament.
Matthew
Matthewβ€’11mo ago
Its okk. Happy to help πŸ™‚
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
Thank you so much for the help man ❀️
Matthew
Matthewβ€’11mo ago
Make sure to mark it as solved so others can see it if they need to
.Sifat Kazi
.Sifat KaziOPβ€’11mo ago
Okay
Sujay Barma
Sujay Barmaβ€’4mo ago
Hello @Matthew , I am new to filament. Can you please help where can I find this livewire config file? inside vendor?
Matthew
Matthewβ€’4mo ago
php artisan vendor:publish --tag=livewire:config technically yes, its inside vendor. But if you modify the vendor file, it wont be "saved". In the sense that the next time you do composer install the changes you made wont be there.
Sujay Barma
Sujay Barmaβ€’4mo ago
Thank you πŸ™
Matthew
Matthewβ€’4mo ago
You're welcome πŸ™‚
Want results from more Discord servers?
Add your server