uploadify-button_image_url-请求地址 以及cancelImage图片请求不到的错误

最近项目用上了jquery uploadfy,按钮又丑又难用,chrome控制台老会报错,请求不到

网上搜了搜
当访问到上传页面url,uploadify初始化时再一次访问该url

 所以老是会请求报错,通过debug查出来原来是uploadfy的一个参数请求button_image_url

如果不设置地址的话,会自动访问本页面url,所以把js里的button_image_url设置改一下就ok

 

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

 

 

 

参考出处

 

 

 

uploadfy有一个cancelImage的参数设置,目的是为删除正在上传中的队列,但是一直找不到,即使在js中设置的是对的路径也不行,后来发现原来图片是在uploadfy.css里面设置的。

.uploadify-queue-item .cancel a {
	background: url('uploadify-cancel.png') 0 0 no-repeat;
	float: right;
	height:	16px;
	text-indent: -9999px;
	width: 16px;
}

 修改图片路径即可,无需在js里重新设置

你可能感兴趣的:(uploadify)