$.AjaxFileUpload is not woking in latest version of Chrome Version 83.0.4103.61 (Official Build) (64-bit)

前端 未结 3 888
逝去的感伤
逝去的感伤 2021-01-19 03:31

From the latest version of Chrome Version 83.0.4103.61 (Official Build) (64-bit) Jquery $.AjaxFileUpload is not working, Please help me if anyone has idea, This AJAX call is

3条回答
  •  醉话见心
    2021-01-19 04:10

    There is another jQuery plugin that relied on creating an iframe with src="javascript:false" and it seems like chrome 83 doesn't like it anymore (https://github.com/jquery-form/form/issues/571). It looks like (as per the jsFiddle posted there) chrome 83 block the call when using that src attribute value (I have verified it myself with Chrome 83.0.4103.61-1) but dones't block it if the src attribute value is about:blank.

    As per the source for the plugin you are using, it creates an iframe with the aforementioned src attribute value (https://github.com/davgothic/AjaxFileUpload/blob/master/jquery.ajaxfileupload.js#L99), and thus the issue. Changing that line into this should solve the issue:

    .append('');
    

    Although the plugin hasn't changed much in the last few years (last commit was about 2 years ago), you can do a Pull Request with this change.

提交回复
热议问题