jQuery-File-Upload not firing done callback in Internet Explorer (IE9)

Ricardo Brazão picture Ricardo Brazão · Oct 10, 2013 · Viewed 13.9k times · Source

i checked some questions regarding the same issue, blueimp jquery file upload - "done", "complete" callbacks not working for IE 9 , but even after putting my Content-Type as 'text/html' as the response the 'done' callback isn't being fired. Also as the jQuery-File-Upload says i need to have a redirect to get the uploaded file (https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads) after the upload is done, but that isn't also being done. Any help would be appreciated. Regards.

Answer

Ricardo Brazão picture Ricardo Brazão · Oct 11, 2013

ok so i go it working.The problem was that in the fileuploader configuration i had

dataType: 'json'

but since IE9 uses the iframe it makes a html request, and the response has the Content-Type 'text/html'. With that configuration the fileuploader is expecting to receive a json response so my response was going to a fail callback i made just for testing. Got it working by looking at this post jQuery FileUpload doesn't trigger 'done'