Skip to content

Commit ae072ff

Browse files
committed
Squashed 'vendor/jquery-fileupload/' content from commit aa89dd6
git-subtree-dir: vendor/jquery-fileupload git-subtree-split: aa89dd62bddea68969be626547f1eed2f2631534
0 parents commit ae072ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+10277
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
*.pyc
3+
node_modules

.jshintrc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
3+
"camelcase" : true, // true: Identifiers must be in camelCase
4+
"curly" : true, // true: Require {} for every new block or scope
5+
"eqeqeq" : true, // true: Require triple equals (===) for comparison
6+
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
7+
"immed" : true, // true: Require immediate invocations to be wrapped in parens
8+
// e.g. `(function () { } ());`
9+
"indent" : 4, // {int} Number of spaces to use for indentation
10+
"latedef" : true, // true: Require variables/functions to be defined before being used
11+
"newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
12+
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
13+
"noempty" : true, // true: Prohibit use of empty blocks
14+
"nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
15+
"plusplus" : false, // true: Prohibit use of `++` & `--`
16+
"quotmark" : "single", // Quotation mark consistency:
17+
// false : do nothing (default)
18+
// true : ensure whatever is used is consistent
19+
// "single" : require single quotes
20+
// "double" : require double quotes
21+
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
22+
"unused" : true, // true: Require all defined variables be used
23+
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
24+
"trailing" : true, // true: Prohibit trailing whitespaces
25+
"maxparams" : false, // {int} Max number of formal params allowed per function
26+
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
27+
"maxstatements" : false, // {int} Max number statements per function
28+
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
29+
"maxlen" : false, // {int} Max number of characters per line
30+
31+
// Relaxing
32+
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
33+
"boss" : false, // true: Tolerate assignments where comparisons would be expected
34+
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
35+
"eqnull" : false, // true: Tolerate use of `== null`
36+
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
37+
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
38+
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
39+
// (ex: `for each`, multiple try/catch, function expression…)
40+
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
41+
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
42+
"funcscope" : false, // true: Tolerate defining variables inside control statements"
43+
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
44+
"iterator" : false, // true: Tolerate using the `__iterator__` property
45+
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
46+
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
47+
"laxcomma" : false, // true: Tolerate comma-first style coding
48+
"loopfunc" : false, // true: Tolerate functions being defined in loops
49+
"multistr" : false, // true: Tolerate multi-line strings
50+
"proto" : false, // true: Tolerate using the `__proto__` property
51+
"scripturl" : false, // true: Tolerate script-targeted URLs
52+
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
53+
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
54+
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
55+
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
56+
"validthis" : false, // true: Tolerate using this in a non-constructor function
57+
58+
// Environments
59+
"browser" : false, // Web Browser (window, document, etc)
60+
"couch" : false, // CouchDB
61+
"devel" : false, // Development/debugging (alert, confirm, etc)
62+
"dojo" : false, // Dojo Toolkit
63+
"jquery" : false, // jQuery
64+
"mootools" : false, // MooTools
65+
"node" : false, // Node.js
66+
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
67+
"prototypejs" : false, // Prototype and Scriptaculous
68+
"rhino" : false, // Rhino
69+
"worker" : false, // Web Workers
70+
"wsh" : false, // Windows Scripting Host
71+
"yui" : false, // Yahoo User Interface
72+
73+
// Legacy
74+
"nomen" : true, // true: Prohibit dangling `_` in variables
75+
"onevar" : true, // true: Allow only one `var` statement per function
76+
"passfail" : false, // true: Stop on first error
77+
"white" : true, // true: Check against strict whitespace and indentation rules
78+
79+
// Custom Globals
80+
"globals" : {} // additional predefined global variables
81+
}

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Issue Guidelines
2+
3+
The issues tracker should only be used for **bugs** or **feature requests**.
4+
5+
Please post **support requests** and **general discussions** about this project to the [support forum](https://groups.google.com/d/forum/jquery-fileupload).
6+
7+
## Bugs
8+
9+
Please follow these guidelines before reporting a bug:
10+
11+
1. **Update to the latest version** — Check if you can reproduce the issue with the latest version from the `master` branch.
12+
13+
2. **Use the GitHub issue search** — check if the issue has already been reported. If it has been, please comment on the existing issue.
14+
15+
3. **Isolate the demonstrable problem** — Try to reproduce the problem with the [Demo](https://blueimp.github.io/jQuery-File-Upload/) or with a reduced test case that includes the least amount of code necessary to reproduce the problem.
16+
17+
4. **Provide a means to reproduce the problem** — Please provide as much details as possible, e.g. server information, browser and operating system versions, steps to reproduce the problem. If possible, provide a link to your reduced test case, e.g. via [JSFiddle](http://jsfiddle.net/).
18+
19+
20+
## Feature requests
21+
22+
Please follow the bug guidelines above for feature requests, i.e. update to the latest version and search for exising issues before posting a new request.
23+
24+
Generally, feature requests might be accepted if the implementation would benefit a broader use case or the project could be considered incomplete without that feature.
25+
26+
If you need help integrating this project into another framework, please post your request to the [support forum](https://groups.google.com/d/forum/jquery-fileupload).
27+
28+
## Pull requests
29+
30+
[Pull requests](https://help.github.com/articles/using-pull-requests) are welcome and the preferred way of accepting code contributions.
31+
32+
However, if you add a server-side upload handler implementation for another framework, please continue to maintain this version in your own fork without sending a pull request. You are welcome to add a link and possibly documentation about your implementation to the [Wiki](https://github.com/blueimp/jQuery-File-Upload/wiki).
33+
34+
Please follow these guidelines before sending a pull request:
35+
36+
1. Update your fork to the latest upstream version.
37+
38+
2. Follow the coding conventions of the original repository. Changes to one of the JavaScript source files are required to pass the [JSHint](http://www.jshint.com/) validation tool.
39+
40+
3. Keep your commits as atomar as possible, i.e. create a new commit for every single bug fix or feature added.
41+
42+
4. Always add meaningfull commit messages.

Gruntfile.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* jQuery File Upload Gruntfile
3+
* https://github.com/blueimp/jQuery-File-Upload
4+
*
5+
* Copyright 2013, Sebastian Tschan
6+
* https://blueimp.net
7+
*
8+
* Licensed under the MIT license:
9+
* http://www.opensource.org/licenses/MIT
10+
*/
11+
12+
/*global module */
13+
14+
module.exports = function (grunt) {
15+
'use strict';
16+
17+
grunt.initConfig({
18+
jshint: {
19+
options: {
20+
jshintrc: '.jshintrc'
21+
},
22+
all: [
23+
'Gruntfile.js',
24+
'js/cors/*.js',
25+
'js/*.js',
26+
'server/node/server.js',
27+
'test/test.js'
28+
]
29+
}
30+
});
31+
32+
grunt.loadNpmTasks('grunt-contrib-jshint');
33+
grunt.loadNpmTasks('grunt-bump-build-git');
34+
grunt.registerTask('test', ['jshint']);
35+
grunt.registerTask('default', ['test']);
36+
37+
};

README.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# jQuery File Upload Plugin
2+
3+
## Demo
4+
[Demo File Upload](https://blueimp.github.io/jQuery-File-Upload/)
5+
6+
## Description
7+
File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.
8+
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.
9+
10+
## Setup
11+
* [How to setup the plugin on your website](https://github.com/blueimp/jQuery-File-Upload/wiki/Setup)
12+
* [How to use only the basic plugin (minimal setup guide).](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
13+
14+
## Support
15+
16+
* **[Support Forum](https://groups.google.com/d/forum/jquery-fileupload)**
17+
**Support requests** and **general discussions** about the File Upload plugin can be posted to the official
18+
[Support Forum](https://groups.google.com/d/forum/jquery-fileupload).
19+
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](http://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload).
20+
21+
* Bugs and Feature requests
22+
**Bugs** and **Feature requests** can be reported using the [issues tracker](https://github.com/blueimp/jQuery-File-Upload/issues).
23+
Please read the [issue guidelines](https://github.com/blueimp/jQuery-File-Upload/blob/master/CONTRIBUTING.md) before posting.
24+
25+
## Features
26+
* **Multiple file upload:**
27+
Allows to select multiple files at once and upload them simultaneously.
28+
* **Drag & Drop support:**
29+
Allows to upload files by dragging them from your desktop or filemanager and dropping them on your browser window.
30+
* **Upload progress bar:**
31+
Shows a progress bar indicating the upload progress for individual files and for all uploads combined.
32+
* **Cancelable uploads:**
33+
Individual file uploads can be canceled to stop the upload progress.
34+
* **Resumable uploads:**
35+
Aborted uploads can be resumed with browsers supporting the Blob API.
36+
* **Chunked uploads:**
37+
Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
38+
* **Client-side image resizing:**
39+
Images can be automatically resized on client-side with browsers supporting the required JS APIs.
40+
* **Preview images, audio and video:**
41+
A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
42+
* **No browser plugins (e.g. Adobe Flash) required:**
43+
The implementation is based on open standards like HTML5 and JavaScript and requires no additional browser plugins.
44+
* **Graceful fallback for legacy browsers:**
45+
Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
46+
* **HTML file upload form fallback:**
47+
Allows progressive enhancement by using a standard HTML file upload form as widget element.
48+
* **Cross-site file uploads:**
49+
Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
50+
* **Multiple plugin instances:**
51+
Allows to use multiple plugin instances on the same webpage.
52+
* **Customizable and extensible:**
53+
Provides an API to set individual options and define callBack methods for various upload events.
54+
* **Multipart and file contents stream uploads:**
55+
Files can be uploaded as standard "multipart/form-data" or file contents stream (HTTP PUT file upload).
56+
* **Compatible with any server-side application platform:**
57+
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
58+
59+
## Requirements
60+
61+
### Mandatory requirements
62+
* [jQuery](https://jquery.com/) v. 1.6+
63+
* [jQuery UI widget factory](https://api.jqueryui.com/jQuery.widget/) v. 1.9+ (included)
64+
* [jQuery Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) (included)
65+
66+
The jQuery UI widget factory is a requirement for the basic File Upload plugin, but very lightweight without any other dependencies from the jQuery UI suite.
67+
68+
The jQuery Iframe Transport is required for [browsers without XHR file upload support](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
69+
70+
### Optional requirements
71+
* [JavaScript Templates engine](https://github.com/blueimp/JavaScript-Templates) v. 2.5.4+
72+
* [JavaScript Load Image library](https://github.com/blueimp/JavaScript-Load-Image) v. 1.13.0+
73+
* [JavaScript Canvas to Blob polyfill](https://github.com/blueimp/JavaScript-Canvas-to-Blob) v. 2.1.1+
74+
* [blueimp Gallery](https://github.com/blueimp/Gallery) v. 2.15.1+
75+
* [Bootstrap CSS framework](http://getbootstrap.com/) v. 3.2.0+
76+
* [Glyphicons](http://glyphicons.com/)
77+
78+
The JavaScript Templates engine is used to render the selected and uploaded files for the Basic Plus UI and jQuery UI versions.
79+
80+
The JavaScript Load Image library and JavaScript Canvas to Blob polyfill are required for the image previews and resizing functionality.
81+
82+
The blueimp Gallery is used to display the uploaded images in a lightbox.
83+
84+
The user interface of all versions except the jQuery UI version is built with Twitter's [Bootstrap](http://getbootstrap.com/) framework and icons from [Glyphicons](http://glyphicons.com/).
85+
86+
### Cross-domain requirements
87+
[Cross-domain File Uploads](https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads) using the [Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) require a redirect back to the origin server to retrieve the upload results. The [example implementation](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/main.js) makes use of [result.html](https://github.com/blueimp/jQuery-File-Upload/blob/master/cors/result.html) as a static redirect page for the origin server.
88+
89+
The repository also includes the [jQuery XDomainRequest Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/cors/jquery.xdr-transport.js), which enables limited cross-domain AJAX requests in Microsoft Internet Explorer 8 and 9 (IE 10 supports cross-domain XHR requests).
90+
The XDomainRequest object allows GET and POST requests only and doesn't support file uploads. It is used on the [Demo](https://blueimp.github.io/jQuery-File-Upload/) to delete uploaded files from the cross-domain demo file upload service.
91+
92+
## Browsers
93+
94+
### Desktop browsers
95+
The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:
96+
97+
* Google Chrome
98+
* Apple Safari 4.0+
99+
* Mozilla Firefox 3.0+
100+
* Opera 11.0+
101+
* Microsoft Internet Explorer 6.0+
102+
103+
### Mobile browsers
104+
The File Upload plugin has been tested with and supports the following mobile browsers:
105+
106+
* Apple Safari on iOS 6.0+
107+
* Google Chrome on iOS 6.0+
108+
* Google Chrome on Android 4.0+
109+
* Default Browser on Android 2.3+
110+
* Opera Mobile 12.0+
111+
112+
### Supported features
113+
For a detailed overview of the features supported by each browser version please have a look at the [Extended browser support information](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
114+
115+
## License
116+
Released under the [MIT license](http://www.opensource.org/licenses/MIT).
117+
118+
## Donations
119+
jQuery File Upload is free software, but you can donate to support the developer, Sebastian Tschan:
120+
121+
Flattr: [![Flattr](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/286433/jQuery-File-Upload-Plugin)
122+
123+
PayPal: [![PayPal](https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PYWYSYP77KL54)

0 commit comments

Comments
 (0)