Skip to content

shaozhuqing/jqueryupload_cn

Repository files navigation

jQuery文件上传插件

演示

演示 jquery文件上传

说明

文件上传多个文件选择,拖放支持,进度条,验证和预览图像,音频和视频的jQuery部件。

支持跨域,分块和可恢复的文件上传和客户端图像缩放。

工程与任何服务器端平台(PHP,Python和Ruby on Rails的,java,Node.js,Go等),支持标准的HTML表单文件上传。

特点

  • 多文件上传:   允许选择多个文件同时上传。
  • 拖放支持:   允许上传文件将它们从你的桌面或文件管理器拖放您的浏览器窗口。
  • 上传进度条:   显示一个进度条,显示单个文件的上传进度,并为所有上传图片结合。
  • 可取消上传:   可以取消单个文件上传,,停止上传进度。
  • 可恢复上传:   中止上传可以恢复,支持BLOB API的浏览器。
  • 分块上传:   较小的块,可以上传大文件支持BLOB API的浏览器。
  • 客户端的图片大小:   图像可以自动调整客户端的浏览器支持所需的JS API。
  • 预览图像,音频和视频:   上传前的预览图像,音频和视频文件,可以显示浏览器支持所需的API。
  • 没有浏览器插件(例如Adobe的Flash):   的实现是基于HTML5和JavaScript等开放标准和要求没有额外的浏览器插件。
  • 优美的后备旧版浏览器:   如果上传文件,通过XMLHttpRequest的支持和传统的浏览器作为后备使用内置页框。
  • HTML文件上传表单回退:   允许逐步增强,通过使用一个标准的HTML文件上传表单部件元素。
  • 跨站点的文件上传:   支持文件上传,跨站点的XMLHttpRequest或iframe重定向到不同的域。
  • 多个插件实例:   允许使用多个插件实例,在同一网页。
  • 可定制和可扩展性:   提供一个API来设置单独的选项,并为各种上传事件定义回调方法。
  • 多重和文件的内容流上传:   可以上传文件,标准的“多重/表单数据”或文件的内容流(HTTP PUT文件上传)。
  • 兼容任何服务器端应用平台:   工程与任何服务器端平台(PHP,Python和Ruby on Rails,java,Node.js的,Go等),支持标准的HTML表单文件上传。

要求

jQuery UI的小部件是文件上传插件的基本要求,但没有任何其他的依赖非常轻巧。

jQuery的Iframe运输是必需的浏览器没有XHR支持文件上传

在UI版本的文件上传插件也需要JavaScript的模板引擎以及JavaScript的加载图片和JavaScript帆布斑点的功能(图像预览和调整功能)。

在这些依赖被标记为可选的,没有他们作为基本的文件上传插件可用于UI版本的插件可以扩展到覆盖这些依赖关系替代方案。

在Twitter的引导工具包是建立与用户界面。

这使得基于CSS的,反应灵敏的现代浏览器的布局和花哨的过渡效果。

该演示还包括blueimp画廊

这两个组件是可选的,不是必需的。

该库还包括jQuery的XDomainRequest运输插件,这使得跨域AJAX请求(GET和POST)Microsoft Internet Explorer> = 8。

然而,XDomainRequest对象不支持文件上传和插件只为跨域请求所使用的演示,删除上传的文件演示文件上传服务。

跨域文件上传使用IFRAME运输插件需要重新回到原始服务器检索上传结果。

例如执行 使得使用result.html起源服务器作为静态重定向页面。

浏览器

桌面浏览器

文件上传插件定期测试最新的浏览器版本,并支持以下的最低版本:

  • Google Chrome
  • Apple Safari 4.0+
  • Mozilla Firefox 3.0+
  • Opera 11.0+
  • Microsoft Internet Explorer 6.0+

移动浏览器

文件上传插件已经过测试,与支持以下移动浏览器:

  • Apple Safari on iOS 6.0+
  • Google Chrome on iOS 6.0+
  • Google Chrome on Android 4.0+
  • Default Browser on Android 2.3+
  • Opera Mobile 12.0+

支持的功能

每个浏览器版本支持的功能的详细介绍, 请看扩展浏览器的支持信息

许可证

MIT许可下发布。

捐款

jQuery的文件上传是免费软件,但你可以捐款支持插件翻译者:

Alipay: Alipay

=============================================================================================

jQuery File Upload Plugin

Demo

Demo File Upload

Description

File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.

Setup

Support

  • Support Forum
    Support requests and general discussions about the File Upload plugin can be posted to the official Support Forum.
    If your question is not directly related to the File Upload plugin, you might have a better chance to get a reply by posting to Stack Overflow.

  • Bugs and Feature requests
    Bugs and Feature requests can be reported using the issues tracker.
    Please read the issue guidelines before posting.

Features

  • Multiple file upload:
    Allows to select multiple files at once and upload them simultaneously.
  • Drag & Drop support:
    Allows to upload files by dragging them from your desktop or filemanager and dropping them on your browser window.
  • Upload progress bar:
    Shows a progress bar indicating the upload progress for individual files and for all uploads combined.
  • Cancelable uploads:
    Individual file uploads can be canceled to stop the upload progress.
  • Resumable uploads:
    Aborted uploads can be resumed with browsers supporting the Blob API.
  • Chunked uploads:
    Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
  • Client-side image resizing:
    Images can be automatically resized on client-side with browsers supporting the required JS APIs.
  • Preview images, audio and video:
    A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
  • No browser plugins (e.g. Adobe Flash) required:
    The implementation is based on open standards like HTML5 and JavaScript and requires no additional browser plugins.
  • Graceful fallback for legacy browsers:
    Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
  • HTML file upload form fallback:
    Allows progressive enhancement by using a standard HTML file upload form as widget element.
  • Cross-site file uploads:
    Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
  • Multiple plugin instances:
    Allows to use multiple plugin instances on the same webpage.
  • Customizable and extensible:
    Provides an API to set individual options and define callBack methods for various upload events.
  • Multipart and file contents stream uploads:
    Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
  • Compatible with any server-side application platform:
    Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.

Requirements

The jQuery UI widget factory is a requirement for the basic File Upload plugin, but very lightweight without any other dependencies.
The jQuery Iframe Transport is required for browsers without XHR file upload support.
The UI version of the File Upload plugin also requires the JavaScript Templates engine as well as the JavaScript Load Image and JavaScript Canvas to Blob functions (for the image previews and resizing functionality). These dependencies are marked as optional, as the basic File Upload plugin can be used without them and the UI version of the plugin can be extended to override these dependencies with alternative solutions.

The User Interface is built with Twitter's Bootstrap Toolkit. This enables a CSS based, responsive layout and fancy transition effects on modern browsers. The demo also includes the blueimp Gallery. Both of these components are optional and not required.

The repository also includes the jQuery XDomainRequest Transport plugin, which enables Cross-domain AJAX requests (GET and POST only) in Microsoft Internet Explorer >= 8. However, the XDomainRequest object doesn't support file uploads and the plugin is only used by the Demo for Cross-domain requests to delete uploaded files from the demo file upload service.

Cross-domain File Uploads using the Iframe Transport plugin require a redirect back to the origin server to retrieve the upload results. The example implementation makes use of result.html as a static redirect page for the origin server.

Browsers

Desktop browsers

The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:

  • Google Chrome
  • Apple Safari 4.0+
  • Mozilla Firefox 3.0+
  • Opera 11.0+
  • Microsoft Internet Explorer 6.0+

Mobile browsers

The File Upload plugin has been tested with and supports the following mobile browsers:

  • Apple Safari on iOS 6.0+
  • Google Chrome on iOS 6.0+
  • Google Chrome on Android 4.0+
  • Default Browser on Android 2.3+
  • Opera Mobile 12.0+

Supported features

For a detailed overview of the features supported by each browser version please have a look at the Extended browser support information.

License

Released under the MIT license.

Donations

jQuery File Upload is free software, but you can donate to support the developer, Sebastian Tschan:

Flattr: Flattr

PayPal: PayPal

About

jquery文件上次汉化

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published