I am uploading files to the server using jQuery:
$.ajax({ url : \'http://www.example.com\', dataType : \'json\', cache : false, contentType
You have to serialize the form using the FormData object instead of only sending the file.
FormData
var formData = new FormData($("form")[0]);