I am working on file uploader which upload the image when the input is changed my code for the form in html is
Instead of sending the data as multipart/form-data:
multipart/form-data
ajax.setRequestHeader("Content-Type", "multipart/form-data");
You should send it as application/json:
application/json
ajax.setRequestHeader("Content-Type", "application/json");