当前位置:主页 > 网页前端 > jquery >

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

时间:2020-10-09 22:42:10 | 栏目: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

您可能感兴趣的文章:

相关文章