FileUpload Validation Messages

I am uploading to a s3 and it all works fine, for some reason the file upload validation messages are not being shown just saying error on upload. Validations are working but the validation error messages are not shown can someone tell me the reason for this issue. I have even set up my liverwire.php configuration file as well, along with php.ini
No description
No description
No description
12 Replies
toeknee
toeknee2w ago
right click inspect and see what the network response was to the request.
Mohamed Ayaou
Mohamed Ayaou2w ago
I think the helper text is overriding that. try to comment the ->helperText() and see as the error messages uses something similar
K1S4K1
K1S4K1OP2w ago
already tried this didnt work tho it shows 422 unprocessable content
K1S4K1
K1S4K1OP2w ago
in the response on network for the 422 i see
No description
No description
Mohamed Ayaou
Mohamed Ayaou2w ago
maybe max upload issue, consider changing that from the field validation, livewire config, and php or server config too
K1S4K1
K1S4K1OP2w ago
on php.ini its set to 40mb on livewire config its set to 25mb in bytes and on the field also set to 25mb in bytes
Mohamed Ayaou
Mohamed Ayaou2w ago
what is the generated file etimated size?
K1S4K1
K1S4K1OP2w ago
you mean the size of the file i'm trying to upload, if so its 31.5 mb
Mohamed Ayaou
Mohamed Ayaou2w ago
Yes sorry I meant the uploaded one, So that's the issue, just increas the limits
K1S4K1
K1S4K1OP2w ago
ok i just change the max to 40 mb in bytes on the livewire config now i can upload the temporary_file and i get the error message after i click create, but what i really wanted to do was to show an error message when the temporary file was uploading through livewire
No description
Mohamed Ayaou
Mohamed Ayaou2w ago
change the field one too Oh, sorry for the misunderstanig!
K1S4K1
K1S4K1OP2w ago
but i need to keep the maxSize on the field to 25mb, currently it looks like this
->acceptedFileTypes([
'image/jpg',
'image/jpeg',
'image/png',
'application/msword',
'application/pdf',
])
->maxSize(25600)
->acceptedFileTypes([
'image/jpg',
'image/jpeg',
'image/png',
'application/msword',
'application/pdf',
])
->maxSize(25600)
what i want to do is to show the error message while the liverwire temporary file upload is taking place not after i click the create button. anyways @Mohamed Ayaou thank you so much for the help!
Want results from more Discord servers?
Add your server