Using blueimp's jQuery-File-Upload at https://github.com/blueimp/jQuery-File-Upload
My application is running on many older browsers. File uploading has a long list of compatibility constraints. I'd like to simply detect when the fileuploader has gracefully fallen back to using iframe transport. I would like to detect this in the jQuery where the fileupload is being used similar to this example:
var using_iframe_transport = false;
this_file_input.fileupload({
dataType: 'json',
url: "http://api.cloudinary.com/v1_1/my_account/image/upload",
//as we send the file upload, record whether it is using iframe
send: function (e, data) {
if (e.iframe_fallback){ //is there a variable like this that exists in the plugin?
using_iframe_transport = true;
}
}
});//end fileupload
if (using_iframe_transport){
//do something
}
It is possible to use this code in the 'progress', 'done', or 'always' callback:
...
progress: function(e){ //or 'done' or 'always'
if($('iframe').length){
using_iframe_transport = true;
}
}
...
However these callbacks are not always made as reported at https://github.com/blueimp/jQuery-File-Upload/issues/461#issuecomment-9299307
My biggest concerns are supporting IE6 and Android 2.3 default browser. Thanks!