F
Filament5mo ago
SIFZ

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
20 Replies
Matthew
Matthew5mo ago
Thats weird. You are setting maxSize() to 1024 kb (1MB) Try and remove (or at least comment) the ->maxSize()
SIFZ
SIFZ5mo 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
toeknee5mo ago
Do not double post. #✅┊rules
Matthew
Matthew5mo ago
Maybe the max size in your php.ini Its the php configuration essentially
SIFZ
SIFZ5mo ago
No its a validation error. php.ini set 2000MB
SIFZ
SIFZ5mo ago
No description
SIFZ
SIFZ5mo ago
No description
Matthew
Matthew5mo ago
Just shooting a shot Can you show this in your livewire config?
Matthew
Matthew5mo ago
No description
Matthew
Matthew5mo ago
Maybe there are validation rules there
SIFZ
SIFZ5mo ago
No description
SIFZ
SIFZ5mo ago
This is how its looking brother @Matthew
Solution
Matthew
Matthew5mo 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.)
SIFZ
SIFZ5mo ago
Thank you brother, This one worked.
No description
Matthew
Matthew5mo ago
Livewire will validate ALL temporary file uploads with the following rules: file|max:12288 by default
SIFZ
SIFZ5mo ago
Get it now. was my first time using filament.
Matthew
Matthew5mo ago
Its okk. Happy to help 🙂
SIFZ
SIFZ5mo ago
Thank you so much for the help man ❤️
Matthew
Matthew5mo ago
Make sure to mark it as solved so others can see it if they need to
SIFZ
SIFZ5mo ago
Okay