jquery-uploadifyv3.2.1 文件上传插件 学习
先认识一下他的属性。
var settings = $.extend({// Required Settings,这3个必须的咯。id : $this.attr('id'), // The ID of the DOM object,IDswf : 'uploadify.swf', // SWF file 路径 uploader : 'uploadify.php', // 服务器处理路径// Options,下面是可设置的属性auto : true, // Automatically upload files when// added to the queue,是否添加以后就自动上传。buttonClass : '', // A class name to add to the// browse button DOM objectbuttonCursor : 'hand', // The cursor to use with// the browse buttonbuttonImage : null, // (String or null) The path to// an image to use for the Flash// browse button if not using// CSS to style the buttonbuttonText : 'SELECT FILES', // The text to use// for the browse// button 文件上传的名字checkExisting : false, // The path to a server-side// script that checks for// existing files on the// server,判断是否已存在相应文件debug : false, // Turn on swfUpload debugging modefileObjName : 'Filedata', // The name of the file// object to use in your// server-side script,对应request的name是什么 **fileSizeLimit : 0, // The maximum size of an// uploadable file in KB// (Accepts units B KB MB GB if// string, 0 for no limit) 文件大小限制,0表示不限制。fileTypeDesc : 'All Files', // The description for// file types in the// browse dialog 文件描述fileTypeExts : '*.*', // Allowed extensions in the// browse dialog// (server-side validation// should also be used),允许的扩展类型height : 30, // The height of the browse button,按钮高度itemTemplate : false, // The template for the file// item in the queuemethod : 'post', // The method to use when// sending files to the// server-side upload script,提交方法,默认为postmulti : true, // Allow multiple file selection in// the browse dialog,是否允许多文件选择,默认为trueformData : {}, // An object with additional data to// send to the server-side upload// script with every file uploadpreventCaching : true, // Adds a random value to// the Flash URL to prevent// caching of it (conflicts// with existing parameters)progressData : 'percentage', // ('percentage' or// 'speed') Data to// show in the queue// item during a// file uploadqueueID : false, // The ID of the DOM object to// use as a file queue (without// the #),文件队列。queueSizeLimit : 999, // The maximum number of// files that can be in the// queue at one timeremoveCompleted : true, // Remove queue items from// the queue when they are// done uploading,完成以后自动移除。removeTimeout : 3, // The delay in seconds before// removing a queue item if// removeCompleted is set to// true,移出的时间requeueErrors : false, // Keep errored files in the// queue and keep trying to// upload them,保持错误的文件在队列里面,并可以重新上传successTimeout : 30, // The number of seconds to// wait for Flash to detect// the server's response// after the file has// finished uploading,完成以后等待服务器30秒uploadLimit : 0, // The maximum number of files// you can upload,上传限制。width : 120, // The width of the browse button,按钮宽度// Events,重载的事件,不重载的话,则会执行自己的再执行原生的 overrideEvents : []}, options);
2.接着是他的事件
onCancel :function(file){}//取消方法 onClearQueue onDestroy onDialogClose onDialogOpen onDisable onEnable onFallback onInit onQueueComplete onSelect onSelectError onSWFReady //上传完成 onUploadComplete: function(file) {alert('The file ' + file.name + ' finished processing.'); }
onUploadError onUploadProgress onUploadStart onUploadSuccess
方法:
$('#file_upload').uploadify('cancel',"*"); // 有*的话,则队列里的所有会// 删掉或上传,没有则作用于// 第一个 $('#file_upload').uploadify('upload','*'); $('#file_upload').uploadify('stop'); $('#file_upload').uploadify('settings','buttonText','BROWSE'); $('#file_upload').uploadify('disable', true); // true - disable,false - enable $('#file_upload').uploadify('destroy');
转载于:https://www.cnblogs.com/cycxtz/p/6017327.html
jquery-uploadifyv3.2.1 文件上传插件 学习相关推荐
- 20+ 个很棒的 jQuery 文件上传插件或教程(此文值得“推荐”和“收藏”)
文件上传是网站很常见的功能之一,通过使用 jQuery 可以让上传过程更加人性化,更好的用户体验.本文介绍20个jQuery的文件上传插件,其中有一些是教程. 1. Plupload Plupload ...
- jquery文件上传插件|进度条
jquery文件上传插件|进度条 一.Uploadify 官网:http://www.uploadify.com/ 下载地址:http://down.51cto.com/data/577863 详细参 ...
- jQuery 文件上传插件:uploadify、swfupload
jQuery 文件上传插件: uploadify.swfupload
- ajax 批量上传图片插件,jQuery多文件上传插件jquery.imageuploader.js
插件描述:jQuery多文件上传插件jquery.imageuploader.js,可以同时上传多个文件并支持拖拽上传 jquery.imageuploader.js 一款jquery多文件上传插件. ...
- jquery uploadify 多文件上传插件 使用经验
2019独角兽企业重金招聘Python工程师标准>>> Uploadify 官网:http://www.uploadify.com/ 一.如何使用呢? 官网原文:http://www ...
- 【转】jquery文件上传插件uploadify在.NET中session丢失的解决方案
2019独角兽企业重金招聘Python工程师标准>>> 基于jQuery和Flash的多文件上传插件uploadify的确很好用,具体配置和使用方法见以前的一篇文章: <一款基 ...
- jquery 文件上传插件_10个jQuery文件上传插件
jquery 文件上传插件 这篇热门文章于2016年7月更新,以反映文件上传插件的当前状态. 有关旧文章的评论已删除. 使用Ajax实施文件上传可能非常困难,特别是如果您需要拖放支持,图像预览或进度条 ...
- js插件---IUpload文件上传插件(包括图片)
js插件---IUpload文件上传插件(包括图片) 一.总结 一句话总结:上传插件找到真正上传位置的代码,这样就可以知道整个上传插件的逻辑了, 找资料还是github+官方 1.如何在js中找到真正 ...
- fileupload的回调方法_jQuery File Upload文件上传插件使用详解
本篇教程介绍了jQuery File Upload文件上传插件使用详解,希望阅读本篇文章以后大家有所收获,帮助大家对jQuery的理解更加深入. < jQuery File Upload 是一个 ...
最新文章
- L4,C16:差1墩,从张数最多的套上去找
- Laravel-admin hasMany表单关联提交报错字段 无详细信息错误说明
- C++内存分配与对象构造的分离
- 主板螺丝是机箱配还是主板配_要配新电脑,A520主板和B450主板哪一个更加值得购买?...
- 如何利用python将mp4文件转换为gif文件 + 代码分享 另附在线转换网址
- coreboot学习5:启动流程跟踪之ramstage阶段主干分析
- Android 10 正式版本或将于 9 月 3 日推出
- 分红酒(广度优先搜索)
- react style: 二级菜单
- P1279 字串距离
- 韦东山freeRTOS系列教程之【第六章】信号量(semaphore)
- 小米AI音响的拆解及简要系统分析
- 浅谈批处理for命令中的变量扩展
- android手机分辨率整理
- 互联网公司干不好上门维修?
- [A133 Android11] 连接pc板子掉电
- php beanstalk 客户端,Pheanstalk(beanstalk的PHP客户端)-连接如何工作?
- PCB设计电源平面处理要点
- IEEE 802.15.4协议完整中文版 - 4.2 IEEE 802.15.4 WPAN 的组件
- Nacos下载与安装(Windows)
热门文章
- location.search
- 企业被黑客攻击,“怼回去”合法吗?
- jpa postgresql 使用uuid作为主键
- Redis实现关注关系
- spring异常 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet
- [Unity3d]u3d中定时器的使用
- 函数作用域导致的问题
- 求教PHP+oracle的开发
- ORACLE 执行计划2
- resources.arsc格式(包-类型-资源项)