bootstrap-fileinput
====================
An enhanced HTML 5 file input for Bootstrap 3.x with file preview for various files, offers multiple selection, and more. The plugin allows you a simple way to setup an advanced file picker/upload control built to work specially with Bootstrap CSS3 styles. It enhances the file input functionality further, by offering support to preview a wide variety of files i.e. images, text, html, video, audio, flash, and objects. In addition, it includes AJAX based uploads, dragging & dropping files, viewing upload progress, and selectively previewing, adding, or deleting files.
![File Input Screenshot](https://lh3.googleusercontent.com/-3FiEmc_okc4/VBw_d2LBAJI/AAAAAAAAAL8/KbVj5X9Dus0/w596-h454-no/FileInput.jpg)
This plugin was initially inspired by [this blog article](http://www.abeautifulsite.net/blog/2013/08/whipping-file-inputs-into-shape-with-bootstrap-3/) and [Jasny's File Input plugin](http://jasny.github.io/bootstrap/javascript/#fileinput). But the plugin has now matured with various additional features and enhancements to be a complete (yet simple) file management tool and solution for web developers.
> NOTE: The latest version of the plugin v4.1.8 has been released. Refer the [CHANGE LOG](https://github.com/kartik-v/bootstrap-fileinput/blob/master/CHANGE.md) for details.
## Features
### File Input Features
1. The plugin will convert a simple HTML file input to an advanced file picker control. Will help fallback to a normal HTML file input for browsers not supporting JQuery or Javascript.
2. The file input consists of the following three sections with options and templates to control the display:
- **_file caption section_**: to display a brief information of the file(s) selected
- **_file action buttons section_**: to browse, remove, and upload files.
- **_file preview section_**: to display the selected files on client for preview (supports preview of image, text, flash, and video file types). Other file types will be displayed as normal thumbnails.
3. The plugin automatically converts an input with `type = file` to an advanced file picker input if you set its `class = file`. All options to the input can be passed as HTML5 `data` attributes.
4. Ability to select and preview multiple files. Uses HTML 5 File reader API to read and preview files. Displays the progress of files being being loaded onto the preview zone, in case many files are chosen.
5. Offers predefined templates and CSS classes which can be changed to style your file-input display as per your needs.
6. With **v1.5.0**, you can now configure the plugin to show an **initial preview of images/files** with **initial caption**
(more useful for record update scenarios). Refer the [`initialPreview`](https://github.com/kartik-v/bootstrap-fileinput/blob/master/README.md#initialpreview)
and [`initialCaption`](https://github.com/kartik-v/bootstrap-fileinput/blob/master/README.md#initialcaption) properties in the plugin options
section for configuring this.
7. Option to show/hide any or all of the following:
- caption section
- preview section
- upload button
- remove button
8. Customise the location of the target container elements to display the entire plugin, the caption container, the caption text, the preview container, preview image, and preview status.
9. For text file previews, autowrap the text to the thumbnail width, and show a wrap indicator link to display complete text on hover. You can customize the wrap indicator (which defaults to …).
10. Customise the messages for preview, progress, and files selected.
11. Upload action defaults to form submit. Supports an upload route/server action parameter for custom ajax based upload.
12. Triggers JQuery events for advanced development. Events currently available are `filereset`, `fileclear`, `filecleared`, `fileloaded`, and `fileerror`.
13. Disabled and readonly file input support.
14. Dynamically auto size the file captions for long file names exceeding container width.
15. Raise new `fileimageuploaded` event that fires after image is completely loaded on the preview container.
16. Autosize preview images when they exceed the size of the preview container.
17. Completely templatized and extensible to allow configuration of the file-input the way the developer wants.
18. Preview intelligence based on various file preview types. The inbuilt file support types are categorized as `image`, `text`, `html`, `video`, `audio`, `flash`, `object`, and `other`.
19. `allowedPreviewTypes`: You can now configure which all file types are allowed to be shown as a preview. This defaults to `['image', 'html', 'text', 'video', 'audio', 'flash', 'object']`. Thus all file types are treated as an object to preview by default. For exampleTo preview only `image` and `video`, you can set this to `['image', 'video']`.
20. `allowedPreviewMimeTypes`: In addition to `allowedPreviewTypes`, you can also control which all mime types can be displayed for preview. This defaults to null, meaning all mime types are supported.
>NOTE: With release 2.5.0 you can now control which file types or extensions are allowed for upload by setting `allowedFileTypes` and `allowedFileExtensions`.
21. `layoutTemplates`: Allows you to configure all layout template settings within one property. The layout objects that can be configured are: `main1`, `main2`, `preview`, `caption`, and `modal`.
22. `previewTemplates`: All preview templates for **each preview type** have been combined into one property, instead of separate templates for image, text etc. The keys are the formats as set in `allowedPreviewTypes` and values are the templates used for previewing. There are default prebuilt templates for each preview file type (`generic`, `image`, `text`, `html`, `video`, `audio`, `flash`, `object`, and `other`). The `generic` template is used only for displaying `initialPreview` content using direct markup.
23. `previewSettings`: Allows you to configure width and height for each preview image type. The plugin has default widths and heights predefined for each type i.e `image`, `text`, `html`, `video`, `audio`, `flash`, and `object`.
24. `fileTypeSettings`: Allows you to configure and identify each preview file type using a callback. The plugin has default callbacks predefined to identify each type i.e `image`, `text`, `html`, `video`, `audio`, `flash`, and `object`.
25. Replacing tags within templates has been enhanced. With this release it will automatically check for multiple occurrences of each tag to replace within a template string.
26. Manipulate events and add your own custom validation messages easily by returning output to abort uploads in any of the other events.
27. Support for translations and locales.
### File Upload Features
With release 4.0.0, the plugin now also includes inbuilt support for AJAX Uploads and selectively adding or deleting files. AJAX upload functionality are
built upon HTML5 FormData and XMLHttpRequest Level 2 standards. Most modern browsers do support this standard, but the plugin will automatically degrade to normal form based submission for unsupported browsers.
1. Add functionality for AJAX based UPLOAD using HTML5 FormData (most modern browsers support it). Will degrade to normal Form Based File submission if this is not supported.
2. To use AJAX Upload, one must set the `uploadUrl` property.
3. Enhance plugin to now allow files to be added, appended, removed (based on FEEDBACK from many). Thus one can append files to preview.
4. New DRAG & DROP zone available in preview to drag and drop files and append.
5. Delete or upload files one by one OR in batch.
6. If `showPreview` is set to false, or uploadUrl is not supported plugin will degrade to normal form based upload.
7. Configurable indicators for file awaiting upload, file successfully uploaded, files errored in upload.
8. Ability to add extra form data with ajax based uploads.
9. Upload progress bar and individu
jane9872
- 粉丝: 109
- 资源: 7797
最新资源
- LabVIEW基于Kvaser USBcan的UDS烧录Hex文件 程序包含 1. 基于ISO14229 UDS通讯,适用于各种服务,如常用的10,22,2E,27,34等服务 2. 解析Hex烧录文
- Comsol54二维旋磁光子晶体单向传输及能带分析 包含二维光子晶体单胞能带求解,超胞能带求解以及单向传输激发
- 大型三菱plcQ系列 四个QD77简易运动模块,通信总线控制 48 轴,程序八万步,写法新颖,思路清晰 读性性和可移植性强,带远程I O 以态网通信,视觉通信,伺服参数设置 程序虽然复杂,但分块编写
- 欧姆龙PLC项目程序NJ系列模切机程序 1、12轴EtherCAT总线伺服运动控制,包含回零、点动、定位、速度控制 2、张力控制PID算法,收放卷径计算, 3、隔膜自动纠偏控制,模拟量数据平均
- k-medoids 聚类方法的MATLAB源代码,导入数据部分和画图部分已经用中文给出了注释 这儿选取一个对象叫做mediod来代替上面的中心 的作用,这样的一个medoid就标识了这个类
- 工业运动控制器,自动追剪,飞剪,旋切 流水线追随工作方式,电子凸轮插补跟踪控制系统,移栽装配机械手,视觉定位功能
- modbus主站源码STM32F103正常使用,读取多个从机功能码通信,写从机寄存器,移植简单,模块化编程,已经过整理,程序流程清晰
- FPGA 以太网 UPD IP 协议实现 fpga 千兆以FPGA 以太网 UPD IP 协议实现 fpga 千兆以FPGA 以太网 UPD IP 协议实现, fpga 千兆以太网接口控制器,FP
- 含分布式电源的三相潮流计算,程序采用前推回代法开展潮流计算,考虑了三相不平衡的情况,通过求解,得到了三相的电压分布和相角分布,同时,还与单相的结果开展对比
- 基于多目标粒子群算法的微电网优化 首先构建了含风光柴储的微电网模型,之后以风光柴储运行成本最低和风光消纳最大为目标,建立了多目标优化模型,模型考虑功率平衡储能SOC等约束通过模型求解得到帕累托前沿 再
- wincc嵌入式excel报表 一、功能介绍 该报表系统能够读取WINCC中历史归档数据,产生出EXCEL报表文件,同时在画面中EXCEL控件实时显示 该报表系统有如下优点: 1、 该报表系统具备日
- 博图WINCC历史数据记录到SQL数据库 将博图WinCC中的变量作为历史数据记录到SQL Server数据库中,并将历史数据记录作为曲线图的方式展示出来,软件采用博图V15.1 Adanced编写
- matlab程序,电力市场,天然气市场出清,主要研究了多方博弈行为及其对市场出清和能源价格的影响 电力市场出清
- 西门子官方飞据例子,定长切断等,1500+v90伺服做的,非常值得学习的资料文件是博图v16.
- 三菱PLC pid程序 三菱触摸屏程序和三菱PLC程序,程序都有注释,用的三菱FX3U系列plc,程序简单仅供入门学习,是入门级三菱PLC电气爱好从业人员学习模板
- Qt数据导入导出(pdf xls)及打印源码 1. 组件同时集成了导出数据到csv、xls、pdf和打印数据 2. 所有操作全部提供静态方法无需new,数据和属性等各种参数设置采用结构体数据,极为方
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈