Search code examples
jqueryhttpcross-browserxmlhttprequest

Can I use jQuery Ajax for a file upload in IE9?


I am revising code that uses XMLHttpRequest for a file upload. I have just learned that this is a v2 feature and unavailable in IE9. If I swap the ajax call out to jQuery, as discussed in the question, How to send FormData objects with Ajax-requests in jQuery?, do I have any hope of this working from IE9?


Solution

  • I am using this library at work for fileupload via ajax: https://github.com/blueimp/jquery-file-upload. It is working nicely with IE 9, it can even support CORS if you use a redirect frame.

    • Google Chrome
    • Apple Safari 4.0+
    • Mozilla Firefox 3.0+
    • Opera 11.0+
    • Microsoft Internet Explorer 6.0+

    It also support the formData you are talking about i think:

    https://github.com/blueimp/jQuery-File-Upload/wiki/Options#formdata