uploadify3.1 参数 中文详解
langFile: 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',//语言包的路径,能设置所有的提示文字
swf: 'http://www.static-xxx.nu/uploader/uploadify.swf',//[必须设置]swf的路径
uploader: '/uploadify/galleri.php',//[必须设置]上传文件触发的url
auto:false,//文件选择完成后,是否自动上传
buttonText:'Välj Filer',//上传按钮的文字
height: 30,//上传按钮的高和宽
width: 120,
formData:{},
buttonCursor: 'pointer',//上传鼠标hover后Cursor的形状
cancelImage: 'http://www.static-xxx.nu/uploadify-cancel.png',//[必须设置]取消图片的路径
checkExisting:'/uploader/uploadify-check-existing.php',//检查上传文件是否存,触发的url,返回1/0
debug: true,//debug模式开/关,打开后会显示debug时的信息
fileObjName:'file',
fileSizeLimit : 0,//文件的极限大小,以字节为单位,0为不限制。1MB:1*1024*1024
fileTypeDesc: 'Bild JPG',//允许上传的文件类型的描述,在弹出的文件选择框里会显示
fileTypeExts: '*.jpg',//允许上传的文件类型,限制弹出文件选择框里能选择的文件
method: 'post',//和后台交互的方式:post/get
multi: true,//是否能选择多个文件
queueID: 'fileQueue',//显示上传文件队列的元素id,可以简单用一个div来显示
queueSizeLimit : 999,//队列中允许的最大文件数目
progressData : 'all', // 'percentage''speed''all'//队列中显示文件上传进度的方式:all-上传速度+百分比,percentage-百分比,speed-上传速度
removeCompleted : true,//上传成功后的文件,是否在队列中自动删除
removeTimeout: 3,
requeueErrors : true,
postData: {},//和后台交互时,附加的参数
preventCaching : true,
transparent: true,
successTimeout : 30,//上传时的
timeoutuploadLimit:999//能同时上传的文件数目,
overrideEvents: ['onSelectError', 'onDialogClose'],//重写方法,使原有方法不执行 用于自定义提示
onDialogClose : function(swfuploadifyQueue) {//当文件选择对话框关闭时触发
if( swfuploadifyQueue.filesErrored > 0 ){
alert( '添加至队列时有'
+swfuploadifyQueue.filesErrored
+'个文件发生错误n'
+'错误信息:'
+swfuploadifyQueue.errorMsg
+'n选定的文件数:'
+swfuploadifyQueue.filesSelected
+'n成功添加至队列的文件数:'
+swfuploadifyQueue.filesQueued
+'n队列中的总文件数量:'
+swfuploadifyQueue.queueLength);
}
}
onDialogOpen : function() {//当选择文件对话框打开时触发
alert( 'Open!');
}
onSelect : function(file) {//当每个文件添加至队列后触发
alert( 'id: ' + file.id
+ ' - 索引: ' + file.index
+ ' - 文件名: ' + file.name
+ ' - 文件大小: ' + file.size
+ ' - 类型: ' + file.type
+ ' - 创建日期: ' + file.creationdate
+ ' - 修改日期: ' + file.modificationdate
+ ' - 文件状态: ' + file.filestatus);
}
onSelectError : function(file,errorCode,errorMsg) {//当文件选定发生错误时触发
alert( 'id: ' + file.id
+ ' - 索引: ' + file.index
+ ' - 文件名: ' + file.name
+ ' - 文件大小: ' + file.size
+ ' - 类型: ' + file.type
+ ' - 创建日期: ' + file.creationdate
+ ' - 修改日期: ' + file.modificationdate
+ ' - 文件状态: ' + file.filestatus
+ ' - 错误代码: ' + errorCode
+ ' - 错误信息: ' + errorMsg);
}
onQueueComplete : function(stats) {//当队列中的所有文件全部完成上传时触发
alert( '成功上传的文件数: ' + stats.successful_uploads
+ ' - 上传出错的文件数: ' + stats.upload_errors
+ ' - 取消上传的文件数: ' + stats.upload_cancelled
+ ' - 出错的文件数' + stats.queue_errors);
}
onUploadComplete : 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);
}
方法:
| 方法名 | 参数 | 描述 |
| cancel(fileID, suppressEvent) | fileID[String]:要取消文件的 ID。 | 检索文件 ID 的最简单方法是使用您要取消文件队列项的 id 属性。可以输入任意数量的文件 Id 作为参数。如果您输入 “*” 作为第一个参数, 该队列中的所有文件将会被都取消。如果没有文件 ID 作为参数设置,在队列中的第一个文件就会被取消。 |
| suppressEvent[Boolean]: | 如果设置为 true,onUploadCancel 事件将不会触发。 | 清除队列时,这非常有用。 取消队列中的文件(无论是否正在上传) |
| destroy() | 无 | 销毁的实例的 Uploadify, 并返回到其原始状态的文件输入 |
| disable(setDisabled) | setDisabled[Boolean]:True为禁用按钮。False为启用按钮 | 禁用或启用浏览按钮。 |
| settings(name, value, resetObjects) | name[String]:要返回或更改设置的属性名称。只有设置了此参数,则将返回值。 value[String]:对当前name属性设 置的值 resetObjects[Boolean]:设置为true时更新的POSTDATA的对象,以清除现有值。否则,新的值将被添加到现有的对象中 | 注: 不能设置SWF属性 获取或设置Uploadify中的属性值 |
| stop() | 无 | 停止当前正在上传的文件 |
| upload(fileID) | fileID[String]:要上传文件的 ID。 | 检索文件 ID 的最简单方法是使用您要取消文件队列项的 id 属性。可以 输入任意数量的文件 Id 作为参数。如果您输入 “*” 作为第一个参数,该队列中的所有文件将会被都取消。如果没有文件 ID 作为参数设置,在队列中的第一个文件就会被取消。 上传的特定文件或在队列中 的所有文件。 |
uploadify3.1 参数 中文详解的更多相关文章
- [转]RSYNC 参数中文详解
FROM : http://www.qiansw.com/rsync-cn.html rsync是一款好用的*nux文件同步工具.下面是其参数的中文解释. Rsync 参数选项说明 -v, --ver ...
- Nginx编译参数大全 configure参数中文详解
./configure --help--help 显示本提示信息--prefix=PATH 设定安装目录--sbin-path=PATH 设定程序文件目录--conf-path=PATH 设定配置文件 ...
- (转)x264参数中文详解(X264 Settings)
0 解释x264命令可选项的用途和使用方法.同执行 x264 --fullhelp 显示顺序.本文主要翻译:mewiki.project357.com/wiki/X264_Settings,同时参考d ...
- Nginx配置文件nginx.conf中文详解(转)
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...
- Nginx中文详解、配置部署及高并发优化
一.Nginx常用命令: 1. 启动 Nginx /usr/local/nginx/sbin/nginxpoechant@ubuntu:sudo ./sbin/nginx2. 停 ...
- jQuery Pagination Ajax分页插件中文详解(摘)
jQuery Pagination Ajax分页插件中文详解 by zhangxinxu from http://www.zhangxinxu.com 本文地址:http://www.zhangxin ...
- Nginx配置文件nginx.conf中文详解【转】
PS:Nginx使用有两三年了,现在经常碰到有新用户问一些很基本的问题,我也没时间一一回答,今天下午花了点时间,结合自己的使用经验,把Nginx的主要配置参数说明分享一下,也参考了一些网络的内容,这篇 ...
- Nginx配置文件中文详解
######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...
- Nginx安全相关配置和nginx.conf中文详解
一.centos下redis安全相关 1.背景 在使用云服务器时,如果我们的redis关闭了protected-mode模式,被病毒攻击的可能会大大增加,因此我们使用redis时候,最好更改默认端口, ...
随机推荐
- C#数组的使用
//计算数组中最大值,最小值,平均值和总和 //类中main最先执行 static void Main(string[] args) { //声明一个数组,数组长度一定固定就不能更改了 , , , , ...
- 关于asp.net会话阻塞
现象:在一个网站中,当访问一个处理比较耗时的页面(A页面),页面请求还没有返回时,此时再点击访问该网站的其他页面(B页面)会出现B页面很久都没有响应和返回,直到A页面输出返回数据时才开始处理B页面的请 ...
- linux笔记2.25
解决vsftpd用root登录不了的问题 把/etc/pam.d/vsftpd文件中的 auth required pam_listfile.so item=user sense=d ...
- [算法导论]贪心算法(greedy algorithm)
转载请注明出处:http://www.cnblogs.com/StartoverX/p/4611544.html 贪心算法在每一步都做出当时看起来最佳的选择.也就是说,它总是做出局部最优的选择,寄希望 ...
- 《python基础教程》笔记之 抽象
创建函数 记录函数,在函数的开头写下字符串,它就会作为函数的一部分进行存储,这称为文档字符串,如 def square(x): 'Caculates the square of the number ...
- 在centos服务器上配置gitlab钩子引发的一系列问题
为了给公司的服务器上搭建gitlab环境并且配置钩子(实现在本地git push之后服务器自动git pull),整了好久,最后终于把问题解决了,下面是记录安装gitlab之后引发的一系列问题: 首先 ...
- iOS开发之UIWebView自动滑动到顶部-备
但可以通过subview来操作. 通常用UIWebView加载网页,有时候需要点击一个按钮,或者页面的某个部位,使页面自动滚动到顶部,但是UIWebView不像UIScrollView那么方便. ...
- JBOSS尝鲜
环境搭建:1. jdk-6u16-windows-i586.exe2. jboss-5.1.0.GA-jdk6.zip JDK安装: 安装过程很简单,应该都知道怎么安装软件....安装完JDK后,需要 ...
- MCS-51单片机内部结构
8051是MCS-51系列单片机的典型产品,我们以这一代表性的机型进行系统的讲解. 8051单片机包含中央处理器.程序存储器(ROM).数据存储器(RAM).定时/计数器.并行接口.串行接口和中断系统 ...
- Valve开源了Direct3D到OpenGL的转译层,方便开发者迁移游戏到Linux(面向游戏玩家的六款最佳 Linux 发行版)
Valve开源了Direct3D到OpenGL的转译层,方便开发者迁移游戏到Linux:https://github.com/ValveSoftware/ToGL Valve SteamBox主机系统 ...