<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. 37.创建自定义的指令的限制使用 通过restrict 设置

    转自:https://www.cnblogs.com/best/tag/Angular/ 1. 元素名 <runoob-directive></runoob-directive> ...

  2. django 笔记8 url模板 自定义函数 simple_tag

    感谢alex老师~ 知识点: URL - 两个没见 url>路由系统> 函数或类 > 返回字符串 Form表单提交: 提交 >url>函数或类中的方法 -.. HttpR ...

  3. String build-in function - len

    len is a build-in function that returns the numbers of characters in a string: Since we started coun ...

  4. java9新特性-21-java的动态编译器

    1. 官方Feature 243: Java-Level JVM Compiler Interface 295: Ahead-of-Time Compilation 2. 产生背景 Oracle 一直 ...

  5. HD-ACM算法专攻系列(3)——Least Common Multiple

    题目描述: 源码: /**/ #include"iostream" using namespace std; int MinComMultiple(int n, int m) { ...

  6. 001.TypeScript简介.md

    TypeScript是一门开源的,由微软开发维护的,发布于2012年10月的静态类型的语言: 他是ECMAScript的超集,支持JavaScript的所有语法和语义,并且在此基础之上提供了更多额外的 ...

  7. SVN: repository browser 库浏览器

    SVN: repository browser  库浏览器 -----如果不想全部下载,可以通过repository browser  库浏览器 从库中选择要下载的文件夹内容下载(svn针对性下载)

  8. PostgreSQL Replication之第四章 设置异步复制(6)

    4.6 有效的清理和恢复结束 最近几年, recovery.conf 已经变得越来越强大了.早在初期(在 PostgreSQL 9.0之前), 仅有 restore_command 和一些 recov ...

  9. 《剑指offer》树的子结构

    一.题目描述 输入两颗二叉树A,B,判断B是不是A的子结构. 二.输入描述 输入两棵树A,B. 三.输出描述 判断B是不是A的子结构,是返回true,否则返回false. 四.牛客网提供的框架 /* ...

  10. ACM-ICPC 2016 Qingdao Preliminary Contest

    A I Count Two Three I will show you the most popular board game in the Shanghai Ingress Resistance T ...