├── .gitignore
├── tests
├── files
│ ├── hello.txt
│ ├── 1px.gif
│ ├── dino.png
│ ├── image.jpg
│ └── lebowski.json
├── grunt-task
│ ├── phantomjs
│ │ ├── bridge.js
│ │ ├── grunt-lib-phantomjs-main.js
│ │ └── grunt-lib-phantomjs.js
│ └── qunit.js
├── index.html
├── qunit
│ └── qunit.css
└── tests.js
├── jcrop
├── Jcrop.gif
├── jquery.Jcrop.min.css
└── jquery.Jcrop.min.js
├── statics
├── body.png
├── content.png
├── body__top.png
├── click-here.png
├── logo_small.png
├── content__head.png
├── splash__blind.png
├── splash__logo.png
├── uploader
│ ├── rotate.png
│ ├── userpic.gif
│ ├── webcam.png
│ └── file-icon.png
├── view-on-github.png
├── jquery.modal.js
└── main.css
├── FileAPI
├── FileAPI.flash.swf
├── FileAPI.flash.camera.swf
├── FileAPI.flash.image.swf
├── crossdomain.xml
├── FileAPI.exif.js
└── FileAPI.min.js
├── composer.json
├── bower.json
├── package.json
├── Gruntfile.js
├── README.md
├── jquery.fileapi.min.js
├── index.html
└── jquery.fileapi.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .idea
3 |
--------------------------------------------------------------------------------
/tests/files/hello.txt:
--------------------------------------------------------------------------------
1 | Hello FileAPI!
2 |
--------------------------------------------------------------------------------
/jcrop/Jcrop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/jcrop/Jcrop.gif
--------------------------------------------------------------------------------
/statics/body.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/body.png
--------------------------------------------------------------------------------
/statics/content.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/content.png
--------------------------------------------------------------------------------
/tests/files/1px.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/tests/files/1px.gif
--------------------------------------------------------------------------------
/tests/files/dino.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/tests/files/dino.png
--------------------------------------------------------------------------------
/statics/body__top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/body__top.png
--------------------------------------------------------------------------------
/statics/click-here.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/click-here.png
--------------------------------------------------------------------------------
/statics/logo_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/logo_small.png
--------------------------------------------------------------------------------
/tests/files/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/tests/files/image.jpg
--------------------------------------------------------------------------------
/FileAPI/FileAPI.flash.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/FileAPI/FileAPI.flash.swf
--------------------------------------------------------------------------------
/statics/content__head.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/content__head.png
--------------------------------------------------------------------------------
/statics/splash__blind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/splash__blind.png
--------------------------------------------------------------------------------
/statics/splash__logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/splash__logo.png
--------------------------------------------------------------------------------
/statics/uploader/rotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/uploader/rotate.png
--------------------------------------------------------------------------------
/statics/uploader/userpic.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/uploader/userpic.gif
--------------------------------------------------------------------------------
/statics/uploader/webcam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/uploader/webcam.png
--------------------------------------------------------------------------------
/statics/view-on-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/view-on-github.png
--------------------------------------------------------------------------------
/statics/uploader/file-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/statics/uploader/file-icon.png
--------------------------------------------------------------------------------
/FileAPI/FileAPI.flash.camera.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/FileAPI/FileAPI.flash.camera.swf
--------------------------------------------------------------------------------
/FileAPI/FileAPI.flash.image.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RubaXa/jquery.fileapi/HEAD/FileAPI/FileAPI.flash.image.swf
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rubaxa/fileapi",
3 | "description": "jQuery plugin for FileAPI (multiupload, image upload, crop, resize and etc.)",
4 | "keywords": ["jquery", "fileapi", "multiupload", "file upload", "upload"],
5 | "homepage": "https://github.com/RubaXa/jquery.fileapi",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Konstantin Lebedev",
10 | "email": "ibnRubaXa@gmail.com"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/FileAPI/crossdomain.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery.fileapi",
3 | "main": "jquery.fileapi.js",
4 | "version": "0.4.11",
5 | "homepage": "http://rubaxa.github.io/jquery.fileapi/",
6 | "authors": [
7 | "RubaXa "
8 | ],
9 | "description": "jQuery plugin for FileAPI (multiupload, image upload, crop, resize and etc.)",
10 | "keywords": [
11 | "FileAPI",
12 | "multiupload",
13 | "upload",
14 | "file",
15 | "html5",
16 | "chunked",
17 | "jquery"
18 | ],
19 | "license": "MIT",
20 | "ignore": [
21 | "node_modules",
22 | "bower_components",
23 | "test",
24 | "tests"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery.fileapi",
3 | "version": "0.4.11",
4 | "devDependencies": {
5 | "grunt": "~0.4.0",
6 | "grunt-version": "*",
7 | "grunt-contrib-jshint": "~0.2.0",
8 | "grunt-contrib-uglify": "*",
9 |
10 | "eventemitter2": "~0.4.9",
11 | "semver": "~1.0.14",
12 | "temporary": "~0.0.4",
13 | "phantomjs": "latest"
14 | },
15 | "description": "jQuery plugin for FileAPI (multiupload, image upload, crop, resize and etc.)",
16 | "main": "jquery.fileapi.js",
17 | "scripts": {
18 | "test": "grunt test"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "git://github.com/rubaxa/jquery.fileapi.git"
23 | },
24 | "keywords": [
25 | "FileAPI",
26 | "upload",
27 | "multiupload",
28 | "file",
29 | "html5",
30 | "chunked",
31 | "jquery",
32 | "plugin"
33 | ],
34 | "author": "Konstantin Lebedev ",
35 | "license": "MIT"
36 | }
37 |
--------------------------------------------------------------------------------
/tests/grunt-task/phantomjs/bridge.js:
--------------------------------------------------------------------------------
1 | /*
2 | * grunt-contrib-qunit
3 | * http://gruntjs.com/
4 | *
5 | * Copyright (c) 2012 "Cowboy" Ben Alman, contributors
6 | * Licensed under the MIT license.
7 | */
8 |
9 | /*global QUnit:true, alert:true*/
10 |
11 | 'use strict';
12 |
13 |
14 | // Don't re-order tests.
15 | QUnit.config.reorder = false;
16 | // Run tests serially, not in parallel.
17 | QUnit.config.autorun = false;
18 |
19 | // Send messages to the parent PhantomJS process via alert! Good times!!
20 | function sendMessage() {
21 | var args = [].slice.call(arguments);
22 | alert(JSON.stringify(args));
23 | }
24 |
25 | // These methods connect QUnit to PhantomJS.
26 | QUnit.log(function(obj) {
27 | // What is this I don’t even
28 | if (obj.message === '[object Object], undefined:undefined') { return; }
29 | // Parse some stuff before sending it.
30 | var actual = QUnit.jsDump.parse(obj.actual);
31 | var expected = QUnit.jsDump.parse(obj.expected);
32 | // Send it.
33 | sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source);
34 | });
35 |
36 | QUnit.testStart(function(obj) {
37 | sendMessage('qunit.testStart', obj.name);
38 | });
39 |
40 | QUnit.testDone(function(obj) {
41 | sendMessage('qunit.testDone', obj.name, obj.failed, obj.passed, obj.total);
42 | });
43 |
44 | QUnit.moduleStart(function(obj) {
45 | sendMessage('qunit.moduleStart', obj.name);
46 | });
47 |
48 | QUnit.moduleDone(function(obj) {
49 | sendMessage('qunit.moduleDone', obj.name, obj.failed, obj.passed, obj.total);
50 | });
51 |
52 | QUnit.begin(function() {
53 | sendMessage('qunit.begin');
54 | });
55 |
56 | QUnit.done(function(obj) {
57 | sendMessage('qunit.done', obj.failed, obj.passed, obj.total, obj.runtime);
58 | });
59 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function (grunt){
4 | // Project configuration.
5 | grunt.initConfig({
6 | pkg: grunt.file.readJSON('package.json'),
7 |
8 | jshint: {
9 | all: ['jquery.fileapi.js'],
10 |
11 | options: {
12 | curly: true // + "Expected '{' and instead saw 'XXXX'."
13 | , immed: true
14 | , latedef: true
15 | , newcap: true // "Tolerate uncapitalized constructors"
16 | , noarg: true
17 | , sub: true
18 | , undef: true
19 | , unused: true
20 | , boss: true
21 | , eqnull: true
22 |
23 | , node: true
24 | , es5: true
25 | , expr: true // - "Expected an assignment or function call and instead saw an expression."
26 | , supernew: true // - "Missing '()' invoking a constructor."
27 | , laxcomma: true
28 | , laxbreak: true
29 | , smarttabs: true
30 | }
31 | },
32 |
33 | qunit: {
34 | options: {
35 | files: {
36 | 'one': ['tests/files/image.jpg']
37 | , 'multiple': ['tests/files/1px.gif', 'tests/files/hello.txt', 'tests/files/image.jpg', 'tests/files/dino.png', 'tests/files/lebowski.json']
38 | }
39 | },
40 | all: ['tests/*.html']
41 | },
42 |
43 | version: {
44 | src: ['<%= pkg.name %>.js', 'bower.json']
45 | },
46 |
47 | uglify: {
48 | options: {
49 | banner: '/*! <%= pkg.name %> <%= pkg.version %> - <%= pkg.license %> | <%= pkg.repository.url %> */\n'
50 | },
51 | dist: {
52 | files: {
53 | '<%= pkg.name %>.min.js': ['<%= pkg.main %>']
54 | }
55 | }
56 | }
57 | });
58 |
59 |
60 | // These plugins provide necessary tasks.
61 | grunt.loadNpmTasks('grunt-version');
62 | grunt.loadNpmTasks('grunt-contrib-jshint');
63 | grunt.loadNpmTasks('grunt-contrib-uglify');
64 |
65 | // Load custom QUnit task, based on grunt-contrib-qunit, but support "files" option.
66 | grunt.loadTasks('./tests/grunt-task/');
67 |
68 | // "npm test" runs these tasks
69 | grunt.registerTask('test', ['jshint', 'qunit']);
70 |
71 |
72 | grunt.registerTask('build', ['version', 'uglify']);
73 |
74 | // Default task.
75 | grunt.registerTask('default', ['test', 'build']);
76 | };
77 |
--------------------------------------------------------------------------------
/jcrop/jquery.Jcrop.min.css:
--------------------------------------------------------------------------------
1 | /* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
2 | .jcrop-holder{direction:ltr;text-align:left;}
3 | .jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
4 | .jcrop-vline{height:100%;width:1px!important;}
5 | .jcrop-vline.right{right:0;}
6 | .jcrop-hline{height:1px!important;width:100%;}
7 | .jcrop-hline.bottom{bottom:0;}
8 | .jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
9 | .jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
10 | .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
11 | .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
12 | .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
13 | .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
14 | .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
15 | .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
16 | .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
17 | .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
18 | .jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
19 | .jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
20 | .jcrop-dragbar.ord-n{margin-top:-4px;}
21 | .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
22 | .jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
23 | .jcrop-dragbar.ord-w{margin-left:-4px;}
24 | .jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
25 | .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
26 | .jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
27 | .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
28 | .solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
29 | .jcrop-holder img,img.jcrop-preview{max-width:none;}
30 |
--------------------------------------------------------------------------------
/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | jQuery.FileAPI :: Tests
8 |
9 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | Choose
44 |
45 |
46 |
47 |
48 |
49 |
50 |
empty.show
51 |
empty.hide
52 |
53 |
emptyQueue.show
54 |
emptyQueue.hide
55 |
56 |
active.show
57 |
active.hide
58 |
59 |
60 |
61 |
<%=$idx%>
62 |
<%=uid%>
63 |
<%=name%>
64 |
<%=type%>
65 |
<%=size%>
66 |
67 |
file.active.show
68 |
file.active.hide
69 |
70 |
71 |
72 |
73 |
74 |
active.show
75 |
active.hide
76 |
77 |
78 |
79 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |