I am working on file uploader which upload the image when the input is changed my code for the form in html is
You have to just remove the following line:
ajax.setRequestHeader("Content-Type", "multipart/form-data");