Jquery uploadify 多余的Get请求(404错误)的解决方法

2017-02-15 20:17:20 jQuery

在使用jquery uploadify时如果不设置button_image_url参数,就会出现一些多余的get请求,甚至报404的错误,这是该插件的一个bug,官方给出的解决方案如下:

找到如下代码:
 

this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url)

修改成

this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
this.settings.button_image_url = this.settings.button_image_url ? SWFUpload.completeURL(this.settings.button_image_url) : this.settings.button_image_url

以上这篇Jquery uploadify 多余的Get请求(404错误)的解决办法就是小编分享给大家的全部内容了,希望能给大家一个参考。