javascript - Ajax file upload using formdata Internet Explorer 10 -
i've been looking solution never succeeded. have ajax call formdata image upload server. code looks
$.ajax({ type:'post', url:'url', data:upload_data, processdata:false, contenttype:false, cache:false, timeout:10000, mimetype:'multipart/form-data', datatype:'json', success:function(data){ if(data.success){ alert(data.success); }else if(data.redirect){ window.location.redirect=data.redirect; }else{ alert(json.stringify(data)); } } });
while sending console remains @ showing "pending". code works in browser except ie10
please me..
previous ie version (8 , previous) not accepting json response ajax submit of multipart form. resulting in never going success callback, , in situations suggesting user download json response text file.
i suppose ie10 not making same mistake. if does, might consider returning json content text, set request datatype text, , parse text response json client side in success callback.
however, before searching headaches, please have @ jquery form plugin handle ajax submit of form (multipart or not) , provide callbacks usefull uploadprogress one.
Comments
Post a Comment