<script type="text/javascript" src="/script/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/script/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="/script/swfupload/handlers.js"></script> var swfu = new SWFUpload({
upload_url: "http://www.aa.com/changeFile", // 文件上传 地址
post_params: {"name" : "huliang"}, // File Upload Settings
file_size_limit : "10 MB",// 1000MB
file_types : "*.doc;*.docx",
file_types_description : "文档",
file_upload_limit : "1", // 限制文件上传个数 为 1 file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
// file_queued_handler : fileQuened,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
button_action:SWFUpload.BUTTON_ACTION.SELECT_FILE, // Button Settings
// button_image_url : "images/SmallSpyGlassWithTransperancy_17x18.png",
button_placeholder_id : "uploadfile",
button_width: 180,
button_height: 18,
button_text : '<span class="blue">上传</span>',
button_text_style : '.blue{color:#0099cc;text-align:center;}',
button_text_top_padding: 0,
button_text_left_padding: 18,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND, // Flash Settings
flash_url : "/script/swfupload/swfupload.swf", custom_settings : {
upload_target : "divFileProgressContainer"
},
// Debug Settings
debug: false //是否显示调试窗体
});
// 选择文件后。马上提交
function fileDialogComplete(){
swfu.startUpload();
}
// 文件上传成功后,回调函数
function uploadSuccess(file, serverData){
alert(serverData);
myalert(0,"上传成功",function(){
<span style="color:#ff0000;">var stats = swfu.getStats();
stats.successful_uploads = 0;
swfu.setStats(stats);</span> });
}
// 文件上传失败,回调函数
function uploadError(){
myalert(0,"上传失败");
swfu.cleanUp();
}
<pre name="code" class="plain"><span style="color:#ff0000;">当上传 1 个文件后,还想在上传,就会报 文件太多的错误。解决方法例如以下:
var stats = swfu.getStats();
stats.successful_uploads = 0;
swfu.setStats(stats);
这样就能够无限制的上传了。。</span>


You have ettempted to queue to many files.You may select one files.的更多相关文章

  1. 14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小

    14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小 改变 InnoDB ...

  2. 14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量

    14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量 改变InnoDB redo ...

  3. Decoding VOX Files in C# (Converting VOX Files to WAV Files)

    I wrote a C# class to decode VOX files into WAV files. It follows the Dialogic ADPCM specificationst ...

  4. 关于Plupload结合上传插件jquery.plupload.queue的使用

    之前使用过很多的上传组件,但对各种浏览器的兼容性太差,不得不放弃!! plupload 是款很强大的上传组件,不得不推荐.plupload 前端根据浏览器不同选择使用Html5. Gears, Sil ...

  5. Why does MySQL produce so many temporary MYD files?

    http://dba.stackexchange.com/questions/30505/why-does-mysql-produce-so-many-temporary-myd-files Data ...

  6. 解决javascript - node and Error: EMFILE, too many open files

    For some days I have searched for a working solution to an error Error: EMFILE, too many open files ...

  7. Database 'xxx' cannot be upgraded because it is read-only or has read-only file Make the database or files writeable, and rerun recovery.

      在分离数据库DatabaseName(暂且用DatabaseName代替该数据库名)后,我将其数据文件以及日志文件移动到新增的磁盘上.然后附加该数据库,结果报如下错误: Database 'Dat ...

  8. [转] Spring MVC sample application for downloading files

    http://www.codejava.net/frameworks/spring/spring-mvc-sample-application-for-downloading-files n this ...

  9. Analyze network packet files very carefully

    As a professional forensic guy, you can not be too careful to anlyze the evidence. Especially when t ...

随机推荐

  1. win7笔记本设置wifi热点

    1.打开cmd 输入netsh wlan set hostednetwork mode=allow ssid=ACE-PC key=12345678 2.等待1-2分钟后,网络连接里会出现一个&quo ...

  2. Linux下离线安装MySQL

    Linux下安装mysql 1 检查并卸载已安装mysql 命令:rpm -qa|grep -i mysql 命令:rpm -e --nodeps ‘上个命令后显示的本机已安装mysql依赖’ 如果存 ...

  3. Find and counter

    Find: In a sense, find is the opposite of the [] operator. Instead of taking an index and extracting ...

  4. bzoj 1088 [SCOI2005] 扫雷

    SCOI2005 扫雷 一道很有趣的(水)题 “这道题有四种解法,你知道么” 给你矩阵的第二列的数字,求出第一列雷有多少种可能的摆法. 不懂扫雷规则的自行按win+R然后输入winmine 思考过后我 ...

  5. request.getxxxxxx()的使用方法

    request.getSchema() 可以返回当前页面使用的协议,http 或是 https; request.getServerName() 可以返回当前页面所在的服务器的名字; request. ...

  6. fuser ---显示出当前程序使用磁盘上的某个文件

    fuser 可以显示出当前哪个程序在使用磁盘上的某个文件.挂载点.甚至网络端口,并给出程序进程的详细信息. fuser只把PID输出到标准输出,其他的都输出到标准错误输出. a 显示所有命令行中指定的 ...

  7. Could not create connection to database server. Attempted reconnect 3 times. Giving up.错误

    项目是基于springboot框架,昨天从git上pull代码之后也没有具体看更改的地方,结果运行的时候就报错了. java.sql.SQLNonTransientConnectionExceptio ...

  8. js cookie 页面倒计时

    疯了啦 写了一篇没有保存需求:页面倒计时 只从第一次加购开始公共方法cookie的设置 获取function getCookie(c_name){ if (document.cookie.length ...

  9. Vue+ElementUI: 手把手教你做一个audio组件

    目的 本项目的目的是教你如何实现一个简单的音乐播放器(这并不难) 本项目并不是一个可以用于生产环境的element播放器,所以并没有考虑太多的兼容性问题 本项目不是ElementUI的一个音频插件,只 ...

  10. IDEA修改当前工程jdk版本

    1.ctrl+shift+alt+s 2.根据实际情况修改jdk版本