The form contains a file upload field to upload an avatar, and a div with an image where to show the uploaded avatar. Here is the script I use to upload:
var uploadAvatarOptions = {
dataType: 'json',
success: function(data) {
if (data.code == 0) {
// Show image using path contained in the data object
This works fine in Firefox. However, in IE, the succedd callback contains null in the data parameter. I think this may be because Firefox sends the following headers on submit:
Spring, in turn, sends a response context type image/gif
So, my questions are, ¿how relevant is the response content type returned to process the data parameter as a json response? ¿is there any possibily to add request accept headers in IE environment? Perhaps the error is somewhere else, and it has nothind to do with headers...