首页 新闻 会员 周边

uploadify 如何 取消选中的文件 ?

0
悬赏园豆:50 [待解决问题]

uploadify 如何 取消选中的文件 ?

我在onSelect中加入了onCancel(e,queueId,fileObj);,文件没有显示到上传列表中,但点击上传按钮,文件却上传了,怎么彻底移除选中的文件?

 $("#uploadify").uploadify({
'uploader': '../include/JS/jquery.uploadify/uploadify.swf?var='+(new Date()).getTime(),
'script': 'OrderOperateFileUpload.ashx',
'method' : 'GET',
'cancelImg': '../include/JS/jquery.uploadify/cancel.png',
'queueID': 'fileQueue',
'auto': false,
'multi': true,
'sizeLimit': FileSize,
'queueSizeLimit' : 5,
'fileDesc' : 'Office文件和PDF文件(*.doc,*.xls,*.ppt,*.pdf)',
'fileExt' : '*.doc;*.xls;*.ppt;*.pdf',
'buttonImg':'../include/JS/jquery.uploadify/browser.gif',
'width':'83',
'height':'26',
'wmode':'transparent',
'onSelect': function(e, queueId, fileObj)
{
if(fileObj.size > FileSize)
{
ZENG.msgbox.show('当前选择的文件超过了设置的大小,请重新选择文件!', 1, 3000);
onCancel(e,queueId,fileObj);
}
if(CheckFileType(fileObj.name) == false)
{
ZENG.msgbox.show('当前只支持*.doc,*.xls,*.ppt,*.pdf!', 1, 3000);
onCancel(e,queueId,fileObj);
}
},
onComplete: function (event, queueID, fileObj, response, data) {
if(response != "0")
{
ZENG.msgbox.show("文件:" + fileObj.name + "上传成功", 4, 3000);
parent.AddNewFile(response);
}
},
onError: function(event, queueID, fileObj) {
ZENG.msgbox.show("文件:" + fileObj.name + "上传失败", 5, 3000);
}
});



Aleax的主页 Aleax | 初学一级 | 园豆:58
提问于:2012-02-20 16:26
< >
分享
所有回答(4)
0

将控件重新加载一次,或者用chrome调试跟踪下,应该不难的,虽然我没用过

az235 | 园豆:8483 (大侠五级) | 2012-02-21 08:10

等于没说.

支持(0) 反对(0) NetStart | 园豆:202 (菜鸟二级) | 2015-03-25 13:19
0

LZ后来怎么解决的?

NetStart | 园豆:202 (菜鸟二级) | 2015-03-25 13:19
0

楼主咋解决的?

铁马金戈007 | 园豆:202 (菜鸟二级) | 2015-12-01 19:39
0

同求~博主怎么解决这个问题的?

我看到的demo是这样的

<input type="file" name="file_upload" id="file_upload" />
<a href="javascript:$('#file_upload').uploadify('upload', '*')">Upload the Files</a> | <a href="javascript:$('#file_upload').uploadify('stop')">Stop the Uploads!</a>

程序猿欢 | 园豆:202 (菜鸟二级) | 2015-12-11 15:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册