File Upload 422 Error

{
"message": "The files.0 failed to upload.",
"errors": {
"files.0": [
"The files.0 failed to upload."
]
}
}
{
"message": "The files.0 failed to upload.",
"errors": {
"files.0": [
"The files.0 failed to upload."
]
}
}
Can't upload a images it gives me a error above on reponse
No description
26 Replies
joemardevs
joemardevsOP2y ago
Code on my file upload
No description
toeknee
toeknee2y ago
Try removing image and optimise. Does it work?
joemardevs
joemardevsOP2y ago
same error
toeknee
toeknee2y ago
What type of file are you uploading?
joemardevs
joemardevsOP2y ago
jpg also png
toeknee
toeknee2y ago
Can you find it in your temporary storage path?
joemardevs
joemardevsOP2y ago
i can't see
toeknee
toeknee2y ago
Make sure to run php artisan storage:link
joemardevs
joemardevsOP2y ago
The error is showing when im gonna upload a above 2MB size but the rules on my livewire is null If im gonna upload a below it will success idk why, but i dont have a validation for size tho yes i already run it
einnlleinhatt_
@Joemar maybe your php setting like upload limit things
joemardevs
joemardevsOP2y ago
No description
joemardevs
joemardevsOP2y ago
but its set to 2G which is 2 Gigabytes
einnlleinhatt_
Does the Laravel log say anything?
joemardevs
joemardevsOP2y ago
says "The files.0 failed to upload."
ModestasV
ModestasV2y ago
Is there anything in laravel.log file?
einnlleinhatt_
I mean the full Laravel log
joemardevs
joemardevsOP2y ago
where i can found this?
ModestasV
ModestasV2y ago
storage/logs/laravel.log
joemardevs
joemardevsOP2y ago
its empty
joemardevs
joemardevsOP2y ago
No description
joemardevs
joemardevsOP2y ago
Thanks guys already found a solution
ChesterS
ChesterS2y ago
No description
toeknee
toeknee2y ago
And what was it?
joemardevs
joemardevsOP2y ago
The problem is the
max_upload_size
max_upload_size
on the php.ini
einnlleinhatt_
2g is not enough? 😱
joemardevs
joemardevsOP2y ago
idk but i changed it to 12M and it works

Did you find this page helpful?