今天用uploadify插件做文件上传的功能。当auto置为true的时候,怎么上传都没有问题。把auto置为了false,想让文件随表单一起上传,相同的代码,点击提交都却报404 not found!
很纳闷,这个路径明明是刚刚auto=true时的路径。
无奈现在的项目用Chrome访问没法跟踪自己写的js,也就进不了源码进行debug。google下这方面的原因,发现需要修改uploadify的源码。
把uploadify.js格式化之后,在大概857行的位置,把下面这行代码注释掉!
this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url)
替换成:
if (this.settings.button_image_url != "") { this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url); }
清掉浏览器缓存,重新访问这个功能,OK!