uploadify 3.0 详细使用说明

时间:2021-05-26

使用:
复制代码 代码如下:
//绑定的界面元素<input id='gallery'type='file'/>
$("#gallery").uploadify({
设置参数,参数如下.
});

设置的属性:
复制代码 代码如下:
id: jQuery(this).attr('id'),//绑定的input的ID
langFile: 'http://plete : function(file,swfuploadifyQueue) {//队列中的每个文件上传完成时触发一次
  alert( 'id: ' + file.id
  + ' - 索引: ' + file.index
  + ' - 文件名: ' + file.name
  + ' - 文件大小: ' + file.size
  + ' - 类型: ' + file.type
  + ' - 创建日期: ' + file.creationdate
  + ' - 修改日期: ' + file.modificationdate
  + ' - 文件状态: ' + file.filestatus
  + ' - 出错的文件数: ' + swfuploadifyQueue.filesErrored
  + ' - 错误信息: ' + swfuploadifyQueue.errorMsg
  + ' - 要添加至队列的数量: ' + swfuploadifyQueue.filesSelected
  + ' - 添加至对立的数量: ' + swfuploadifyQueue.filesQueued
  + ' - 队列长度: ' + swfuploadifyQueue.queueLength);
}

onUploadError : function(file,errorCode,errorMsg,errorString,swfuploadifyQueue) {//上传文件出错是触发(每个出错文件触发一次)
  alert( 'id: ' + file.id
  + ' - 索引: ' + file.index
  + ' - 文件名: ' + file.name
  + ' - 文件大小: ' + file.size
  + ' - 类型: ' + file.type
  + ' - 创建日期: ' + file.creationdate
  + ' - 修改日期: ' + file.modificationdate
  + ' - 文件状态: ' + file.filestatus
  + ' - 错误代码: ' + errorCode
  + ' - 错误描述: ' + errorMsg
  + ' - 简要错误描述: ' + errorString
  + ' - 出错的文件数: ' + swfuploadifyQueue.filesErrored
  + ' - 错误信息: ' + swfuploadifyQueue.errorMsg
  + ' - 要添加至队列的数量: ' + swfuploadifyQueue.filesSelected
  + ' - 添加至对立的数量: ' + swfuploadifyQueue.filesQueued
  + ' - 队列长度: ' + swfuploadifyQueue.queueLength);
}

onUploadProgress : function(file,fileBytesLoaded,fileTotalBytes,
queueBytesLoaded,swfuploadifyQueueUploadSize) {//上传进度发生变更时触发
alert( 'id: ' + file.id
  + ' - 索引: ' + file.index
  + ' - 文件名: ' + file.name
  + ' - 文件大小: ' + file.size
  + ' - 类型: ' + file.type
  + ' - 创建日期: ' + file.creationdate
  + ' - 修改日期: ' + file.modificationdate
  + ' - 文件状态: ' + file.filestatus
  + ' - 当前文件已上传: ' + fileBytesLoaded
  + ' - 当前文件大小: ' + fileTotalBytes
  + ' - 队列已上传: ' + queueBytesLoaded
  + ' - 队列大小: ' + swfuploadifyQueueUploadSize);
}

onUploadStart: function(file) {//上传开始时触发(每个文件触发一次)
  alert( 'id: ' + file.id
  + ' - 索引: ' + file.index
  + ' - 文件名: ' + file.name
  + ' - 文件大小: ' + file.size
  + ' - 类型: ' + file.type
  + ' - 创建日期: ' + file.creationdate
  + ' - 修改日期: ' + file.modificationdate
  + ' - 文件状态: ' + file.filestatus );
}

onUploadSuccess : function(file,data,response) {//上传完成时触发(每个文件触发一次)
  alert( 'id: ' + file.id
  + ' - 索引: ' + file.index
  + ' - 文件名: ' + file.name
  + ' - 文件大小: ' + file.size
  + ' - 类型: ' + file.type
  + ' - 创建日期: ' + file.creationdate
  + ' - 修改日期: ' + file.modificationdate
  + ' - 文件状态: ' + file.filestatus
  + ' - 服务器端消息: ' + data
  + ' - 是否上传成功: ' + response);
}

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章