Extjs4.1 文件夹 多文件上传
Ext.define("Ext.form.field.MultiFile", { extend: 'Ext.form.field.File', alias: ['widget.multifile'], value:[], buttonOnly: true, directory:false, // false是多文件选择,true是文件夹选择 仅支持HTML5的浏览器 // 是否显示tips 展示无法使用 isTips:false, // 元素 tipEl:null, // tips元素 tooltips:null, fileEl:null, // private onRender: function() { var me = this, inputEl; me.callParent(arguments); me.createFileInput(); }, /** * @private * Creates the file input element. It is inserted into the trigger button component, made * invisible, and floated on top of the button's other content so that it will receive the * button's clicks. */ createFileInput : function() { var me = this; fileEl = me.fileInputEl.dom; me.callParent(arguments); var fileconfig = { multiple:true } if(me.directory){ fileconfig["webkitdirectory"] = me.directory; } me.fileInputEl.set(fileconfig).on('change', me.onSelectedChange, me); if(me.tipEl !=null){ me.tipEl.remove(); } me.tipEl = me.browseButtonWrap.createChild({ tag:'span', id:'', cls: 'x-btn-inner', html: '没有选择文件' }); }, clearTips:function(){ var me = this; if(me.tooltips != null){ me.tooltips.destroy(); } }, filesTips:function(){ var me = this; var fileEl = me.fileInputEl.dom; var i = 0; var filelistStr = ""; if (fileEl.files != undefined && fileEl.files != null) { if(fileEl.files.length > 0) { for (i=0; i<fileEl.files.length && i<20; i++) { filelistStr += fileEl.files[i].name+"</br>"; } } else { return; } } else { // For IE : keep only the filename and not the path return; } me.tooltips = new Ext.create('Ext.tip.ToolTip',{ target:me.tipEl, title: '文件列表', width: 200, html: filelistStr, trackMouse: true, listeners:{ show :function(tp, value, eOpts ){ var fileEl = me.fileInputEl.dom; var i = 0; var filelistStr = ""; if (fileEl.files != undefined && fileEl.files != null) { if(fileEl.files.length > 0) { } else { me.clearTips(); } } else { // For IE : keep only the filename and not the path me.clearTips(); } return true; } } }); }, onSelectedChange :function(){ var me = this; me.clearTips(); var fileEl = me.fileInputEl.dom; if (fileEl.files != undefined && fileEl.files != null) { me.tipEl.setHTML('选择了'+fileEl.files.length+'个文件'); me.filesTips(); } else { me.tipEl.setHTML('没有选择文件'); } } });
使用的时候 设置
xtype :'multifile'
directory:true,
相关推荐
用Ext编写的多文件上传组件,已封装。 支持多文件上传,文件下载,文件删除,
ExtJS原生多文件拖动上传组件 使用时修改包路径 1.多文件上传 2.支持拖动上传 3.支持图片压缩 4.支持图片合并 5.文件排序 可扩展实时图片预览 api //初始化画板 initCanvas //上传文件窗口 uploadWindow //初始化...
EXTJS MultiFileUploadField 多文件 上传
官方或网上ExtJS实现多文件上传的UploadDialog只适用于ExtJS2.x,我经过修改使其使用于ExtJS3.x,并在修改时尽量尊重于原始功能代码,请大家放心使用!
支持 自由添加和减少上传文件个数的Extjs多文件上传源代码,10分绝对值得,要注意的一点就是jsp里面引用的Ext的js和css要是2.2版本的
extjs 多文件上传extjs 多文件上传
ExtJS验证文件上传类型,详细讲述ExtJS如何验证文件上传文件的类型!
ExtJS4多文件上传,可单独对每个文件进行管理,有进度条。
用extjs实现的多文件上传,界面很好看,而且很好用的,失望大家试试看
Extjs4 swfupload 多文件 上传
Extjs多文件上传(非SWFUpload版)
NULL 博文链接:https://xiaomy.iteye.com/blog/2331789
Java+Extjs实现单文件上传
只是一次不能选取多个文件,而且界面不够美观,大家可以下载下来看看实现的原理,http://download.csdn.net/detail/cbai0722/5077523或者到我的资源下查找:java跨全域兼容ie/ff/chrome浏览器多文件上传. 当前这个依托...
对应的描述看本人博文《ExtJS4 上传文件类型和大小的判断方法(实例) 》:http://blog.csdn.net/biboheart/article/details/10579175 在这里不具体描述了。看题也大概可以知道这些代码实现了什么应用。
将struts-2.1.6\lib目录下的struts2-codebehind-plugin-2.1.6.jar、struts2-core-2.1.6.jar、struts2-spring-plugin-2.1.6.jar、xwork-2.1.2.jar、ognl-2.6.11.jar、freemarker-2.3.13.jar、commons-fileupload-...
extjs是一个多文件上传的控件。可以实现多文件上传。
Extjs4文件上传,后台struts2
前后台已经融合 解压放在.net 3.5下就可以运行 包含 Extjs4.1 UploadPanel.js swfupload.js swfupload.swf swfupload_fp9.swf Upload.aspx Upload.aspx.cs UploadPanel.htm upload