Recently working on a site, which used a customized version of AjaxFileUpload to upload files, I encountered an issue with Internet Explorer. When uploading it in IE 8 and IE 9, browser would just jump directly to ‘success’ part of the function, without actually posting anything to the specified URL.
The scenario was following:
Clicking on a
button would trigger
click event of a hidden
file type input (
visibility: hidden), which had ajaxFileUpload function on it’s
onchange event. This works fine in most browsers, except that Internet Explorer doesn’t post
file type fields when they are not manually clicked on by the user or when they are hidden.
Once that was figured out, you can use various things to workaround it. We choose to use SI.files jQuery plugin, which shows image in place of file type input. Only thing to make sure with the plugin is that the image should be over the ‘browse’ button, not the text field where it shows path of the file, or it would require double click in Internet Explorer, and also show text selection cursor instead of pointer cursor. Other than that, it works flawlessly over all browsers (at least the ones we tested).