当前位置 博文首页 > lvshaorong的博客:bootstrap3 文件上传插件fileinput中文说明文

    lvshaorong的博客:bootstrap3 文件上传插件fileinput中文说明文

    作者:[db:作者] 时间:2021-07-17 13:22

    file input插件功能如此强大,样式非常美观,并且支持上传文件预览,ajax同步或异步上传,拖曳文件上传等炫酷的功能,完全没有理由不去使用,但是国内很少能找到本插件完整的使用方法,于是本人去其官网翻译了一下英文说明文档放在这里供英文不好的同学勉强查阅。另外附上一段调用方发和servlet端的接收代码,未完待续。

    英文原版地址:http://plugins.krajee.com/file-input

    下文是翻译,有很多不通顺的地方其实是我也没读懂,大家请不要见怪,不知道怎么回事这篇博客突然又很多人看,以前翻译的估计我的英文老师会亲自来打我,于是今天得空又仔细翻译了一遍,由于长时间没做过js了大家有问题也不要问我了,我也没试过。。。

    引言:

    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.

    fileinput是一个增强的基于Bootstrap3.x和HTML5的文件上传工具,具备多种格式文件的预览功能,并提供了诸如文件多选等诸多功能。本插件为你配置了一个先进而简单的文件选择/上传方式并且融合了了Bootstrap CSS3样式。它通过显示很多种文件的预览图,像图片,文本,html,视频,音频,flash和其他文件等,极大的丰富了文件上传的功能,另外,它包含了基于AJAX的上传,拖拽和撤销文件,显示上传进度和可以任意选择的预览,添加,删除文件。

    View a?complete demo.点击此处查看一个完整的demo

    With release v4.0.0, the plugin now supports AJAX based uploads using HTML 5 FormData and XHR2 protocol, which is supported in most modern browsers. It also has inbuilt support for AJAX based file deletion from the server. This thereby allows powerful features to append, add, remove files on the fly. The plugin also has added DRAG & DROP support for ajax uploads. In the event, the browser does not support FormData or XHR2, the plugin degrades it to a normal form submission.

    在4.0.0版本中,该插件已经支持了基于AJAX的上传(使用HTML5 表单和XHR2协议),这种方式已经被很多浏览器所支持。该插件也原生支持了基于AJAX的服务器文件删除功能。因此你可以通过它在客户端实现诸如追加,添加,移出等酷炫的操作。本插件也添加了拖曳添加和拖曳删除的功能。如果你的浏览器不支持表单或者XHR2,本插件会自动的降级成一个普通的提交表单。

    ?

    功能

    提示:本插件的最新版本:v4.3.2已经放出

    File Input Features/选择文件功能

    cs