There are two ways to submit the post data using the jquery ajax
1- In first method we store the input form values one by one into variable and send it to the action page/url.
2- While in second method we can send all the form data without specifying each and every input fields (text/file fields).
In this way we can also submit the image or some other files using jquery ajax
1- Using the manual variable initializing method
2- Using all form fields submission in ajax() function to action page
upload.php file and tested Ouput
echo "File Temp Path:".$_FILES['file']['tmp_name'];
Tested Output by a username text and choosing an image file
File Temp Path:C:\wamp\tmp\phpA3B1.tmpmyimagefile.jpg