I have a form where user can upload/ change their profile picture. The form is passing all the data to php-server except the image. On php side, it shows that $_FILES image is undefined
Please explain, I did not understand.
Do you mean to say that I should replace this line -
var imageUpload = $$('#profile-img [name="imageupload"]').val();
with var imageUpload = $$('#profile-img [input.files]').val();
If yes, then yes I did it but still same issue. Console.log is showing the value of imageUpload as -C:\fakepath\my-photo.jpg. But this value is not passing to php server side.
p.s. I am not very good in javascript, so little explanation in answer will be helpful. Thanks.