mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
update blueimp
This commit is contained in:
parent
0170a7ae6c
commit
9a6888989a
81 changed files with 39036 additions and 7776 deletions
|
@ -38,7 +38,7 @@
|
||||||
"ramsey/uuid": "^3.8",
|
"ramsey/uuid": "^3.8",
|
||||||
"twbs/bootstrap": "4.1.3",
|
"twbs/bootstrap": "4.1.3",
|
||||||
"indieweb/rel-me": "dev-master",
|
"indieweb/rel-me": "dev-master",
|
||||||
"blueimp/jquery-file-upload": "^9.23",
|
"blueimp/jquery-file-upload": "10.*",
|
||||||
"league/flysystem": "^1.0",
|
"league/flysystem": "^1.0",
|
||||||
"simshaun/recurr": "^4.0",
|
"simshaun/recurr": "^4.0",
|
||||||
"jbroadway/urlify": "^1.1",
|
"jbroadway/urlify": "^1.1",
|
||||||
|
|
283
composer.lock
generated
283
composer.lock
generated
|
@ -4,20 +4,20 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "46f7659df7a4f537c8846f1a9c177d8c",
|
"content-hash": "a0ef1b3559f46d6fb71586406f3f1cf5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "blueimp/jquery-file-upload",
|
"name": "blueimp/jquery-file-upload",
|
||||||
"version": "v9.34.0",
|
"version": "v10.31.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||||
"reference": "6d86a591f9a35bb811befb750dcd2c7da9ac05a2"
|
"reference": "0740f81829698b84efe17e72501e0f420ea0d611"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/6d86a591f9a35bb811befb750dcd2c7da9ac05a2",
|
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/0740f81829698b84efe17e72501e0f420ea0d611",
|
||||||
"reference": "6d86a591f9a35bb811befb750dcd2c7da9ac05a2",
|
"reference": "0740f81829698b84efe17e72501e0f420ea0d611",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
@ -59,7 +59,13 @@
|
||||||
"upload",
|
"upload",
|
||||||
"widget"
|
"widget"
|
||||||
],
|
],
|
||||||
"time": "2019-07-22T13:10:51+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/blueimp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-07-13T05:42:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bshaffer/oauth2-server-php",
|
"name": "bshaffer/oauth2-server-php",
|
||||||
|
@ -862,16 +868,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/mime-type-detection",
|
"name": "league/mime-type-detection",
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28",
|
||||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69",
|
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -909,7 +915,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-08-09T10:34:01+00:00"
|
"time": "2020-09-21T18:10:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/oauth2-client",
|
"name": "league/oauth2-client",
|
||||||
|
@ -2304,16 +2310,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v2.1.3",
|
"version": "v2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
|
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665",
|
||||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2322,7 +2328,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -2364,11 +2370,11 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-06-06T08:49:21+00:00"
|
"time": "2020-09-07T11:33:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
"url": "https://github.com/symfony/options-resolver.git",
|
||||||
|
@ -2910,7 +2916,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
|
@ -3735,16 +3741,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.9.0",
|
"version": "v4.10.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "aaee038b912e567780949787d5fe1977be11a778"
|
"reference": "1b479e7592812411c20c34d9ed33db3957bde66e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/aaee038b912e567780949787d5fe1977be11a778",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1b479e7592812411c20c34d9ed33db3957bde66e",
|
||||||
"reference": "aaee038b912e567780949787d5fe1977be11a778",
|
"reference": "1b479e7592812411c20c34d9ed33db3957bde66e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3783,7 +3789,7 @@
|
||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2020-08-18T19:48:01+00:00"
|
"time": "2020-09-23T18:23:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phar-io/manifest",
|
"name": "phar-io/manifest",
|
||||||
|
@ -4110,16 +4116,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-docblock",
|
"name": "phpdocumentor/reflection-docblock",
|
||||||
"version": "5.2.1",
|
"version": "5.2.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||||
"reference": "d870572532cd70bc3fab58f2e23ad423c8404c44"
|
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44",
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||||
"reference": "d870572532cd70bc3fab58f2e23ad423c8404c44",
|
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4158,20 +4164,20 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||||
"time": "2020-08-15T11:14:08+00:00"
|
"time": "2020-09-03T19:13:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/type-resolver",
|
"name": "phpdocumentor/type-resolver",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
"url": "https://github.com/phpDocumentor/TypeResolver.git",
|
||||||
"reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
|
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
|
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||||
"reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
|
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4203,7 +4209,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
|
||||||
"time": "2020-06-27T10:12:23+00:00"
|
"time": "2020-09-17T18:55:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpspec/prophecy",
|
"name": "phpspec/prophecy",
|
||||||
|
@ -4330,16 +4336,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "9.1.4",
|
"version": "9.1.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "4422fca28c3634e2de8c7c373af97a104dd1a45f"
|
"reference": "c9394cb9d07ecfa9351b96f2e296bad473195f4d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4422fca28c3634e2de8c7c373af97a104dd1a45f",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c9394cb9d07ecfa9351b96f2e296bad473195f4d",
|
||||||
"reference": "4422fca28c3634e2de8c7c373af97a104dd1a45f",
|
"reference": "c9394cb9d07ecfa9351b96f2e296bad473195f4d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4347,7 +4353,7 @@
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-xmlwriter": "*",
|
"ext-xmlwriter": "*",
|
||||||
"nikic/php-parser": "^4.8",
|
"nikic/php-parser": "^4.8",
|
||||||
"php": "^7.3 || ^8.0",
|
"php": ">=7.3",
|
||||||
"phpunit/php-file-iterator": "^3.0.3",
|
"phpunit/php-file-iterator": "^3.0.3",
|
||||||
"phpunit/php-text-template": "^2.0.2",
|
"phpunit/php-text-template": "^2.0.2",
|
||||||
"sebastian/code-unit-reverse-lookup": "^2.0.2",
|
"sebastian/code-unit-reverse-lookup": "^2.0.2",
|
||||||
|
@ -4399,7 +4405,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-08-13T15:04:53+00:00"
|
"time": "2020-09-19T05:29:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
|
@ -4628,16 +4634,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
"version": "9.3.7",
|
"version": "9.3.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||||
"reference": "c638a0cac77347980352485912de48c99b42ad00"
|
"reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c638a0cac77347980352485912de48c99b42ad00",
|
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
|
||||||
"reference": "c638a0cac77347980352485912de48c99b42ad00",
|
"reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4651,13 +4657,14 @@
|
||||||
"myclabs/deep-copy": "^1.10.1",
|
"myclabs/deep-copy": "^1.10.1",
|
||||||
"phar-io/manifest": "^2.0.1",
|
"phar-io/manifest": "^2.0.1",
|
||||||
"phar-io/version": "^3.0.2",
|
"phar-io/version": "^3.0.2",
|
||||||
"php": "^7.3 || ^8.0",
|
"php": ">=7.3",
|
||||||
"phpspec/prophecy": "^1.11.1",
|
"phpspec/prophecy": "^1.11.1",
|
||||||
"phpunit/php-code-coverage": "^9.1.1",
|
"phpunit/php-code-coverage": "^9.1.11",
|
||||||
"phpunit/php-file-iterator": "^3.0.4",
|
"phpunit/php-file-iterator": "^3.0.4",
|
||||||
"phpunit/php-invoker": "^3.1",
|
"phpunit/php-invoker": "^3.1",
|
||||||
"phpunit/php-text-template": "^2.0.2",
|
"phpunit/php-text-template": "^2.0.2",
|
||||||
"phpunit/php-timer": "^5.0.1",
|
"phpunit/php-timer": "^5.0.1",
|
||||||
|
"sebastian/cli-parser": "^1.0",
|
||||||
"sebastian/code-unit": "^1.0.5",
|
"sebastian/code-unit": "^1.0.5",
|
||||||
"sebastian/comparator": "^4.0.3",
|
"sebastian/comparator": "^4.0.3",
|
||||||
"sebastian/diff": "^4.0.2",
|
"sebastian/diff": "^4.0.2",
|
||||||
|
@ -4722,7 +4729,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-08-11T15:36:12+00:00"
|
"time": "2020-09-24T08:08:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "psr/container",
|
||||||
|
@ -4819,6 +4826,58 @@
|
||||||
],
|
],
|
||||||
"time": "2019-01-08T18:20:26+00:00"
|
"time": "2019-01-08T18:20:26+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sebastian/cli-parser",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/sebastianbergmann/cli-parser.git",
|
||||||
|
"reference": "2a4a38c56e62f7295bedb8b1b7439ad523d4ea82"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2a4a38c56e62f7295bedb8b1b7439ad523d4ea82",
|
||||||
|
"reference": "2a4a38c56e62f7295bedb8b1b7439ad523d4ea82",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.3 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"src/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Sebastian Bergmann",
|
||||||
|
"email": "sebastian@phpunit.de",
|
||||||
|
"role": "lead"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Library for parsing CLI options",
|
||||||
|
"homepage": "https://github.com/sebastianbergmann/cli-parser",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/sebastianbergmann",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-08-12T10:49:21+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit",
|
"name": "sebastian/code-unit",
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -5669,7 +5728,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/browser-kit",
|
"name": "symfony/browser-kit",
|
||||||
"version": "v4.4.11",
|
"version": "v4.4.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/browser-kit.git",
|
"url": "https://github.com/symfony/browser-kit.git",
|
||||||
|
@ -5742,16 +5801,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/config",
|
"name": "symfony/config",
|
||||||
"version": "v4.4.11",
|
"version": "v4.4.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/config.git",
|
"url": "https://github.com/symfony/config.git",
|
||||||
"reference": "b1d8f0d9341ea1d378b8b043ba90739f37c49d36"
|
"reference": "043bf8652c307ebc23ce44047d215eec889d8850"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/config/zipball/b1d8f0d9341ea1d378b8b043ba90739f37c49d36",
|
"url": "https://api.github.com/repos/symfony/config/zipball/043bf8652c307ebc23ce44047d215eec889d8850",
|
||||||
"reference": "b1d8f0d9341ea1d378b8b043ba90739f37c49d36",
|
"reference": "043bf8652c307ebc23ce44047d215eec889d8850",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5816,20 +5875,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-15T08:27:46+00:00"
|
"time": "2020-08-10T07:27:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "2226c68009627934b8cfc01260b4d287eab070df"
|
"reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/2226c68009627934b8cfc01260b4d287eab070df",
|
"url": "https://api.github.com/repos/symfony/console/zipball/186f395b256065ba9b890c0a4e48a91d598fa2cf",
|
||||||
"reference": "2226c68009627934b8cfc01260b4d287eab070df",
|
"reference": "186f395b256065ba9b890c0a4e48a91d598fa2cf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5909,11 +5968,11 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-06T13:23:11+00:00"
|
"time": "2020-09-02T07:07:40+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
|
@ -5980,16 +6039,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dependency-injection",
|
"name": "symfony/dependency-injection",
|
||||||
"version": "v4.4.11",
|
"version": "v4.4.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/dependency-injection.git",
|
"url": "https://github.com/symfony/dependency-injection.git",
|
||||||
"reference": "f33a28edd42708ed579377391b3a556bcd6a626d"
|
"reference": "384c2601e5a6228d60b041911d63f010e0885ffb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f33a28edd42708ed579377391b3a556bcd6a626d",
|
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/384c2601e5a6228d60b041911d63f010e0885ffb",
|
||||||
"reference": "f33a28edd42708ed579377391b3a556bcd6a626d",
|
"reference": "384c2601e5a6228d60b041911d63f010e0885ffb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6063,20 +6122,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-23T08:31:43+00:00"
|
"time": "2020-09-01T17:42:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dom-crawler",
|
"name": "symfony/dom-crawler",
|
||||||
"version": "v4.4.11",
|
"version": "v4.4.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/dom-crawler.git",
|
"url": "https://github.com/symfony/dom-crawler.git",
|
||||||
"reference": "72b3a65ddd5052cf6d65eac6669748ed311f39bf"
|
"reference": "6dd1e7adef4b7efeeb9691fd619279027d4dcf85"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/72b3a65ddd5052cf6d65eac6669748ed311f39bf",
|
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/6dd1e7adef4b7efeeb9691fd619279027d4dcf85",
|
||||||
"reference": "72b3a65ddd5052cf6d65eac6669748ed311f39bf",
|
"reference": "6dd1e7adef4b7efeeb9691fd619279027d4dcf85",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6138,20 +6197,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-23T08:31:43+00:00"
|
"time": "2020-08-12T06:20:35+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
"reference": "7827d55911f91c070fc293ea51a06eec80797d76"
|
"reference": "94871fc0a69c3c5da57764187724cdce0755899c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7827d55911f91c070fc293ea51a06eec80797d76",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/94871fc0a69c3c5da57764187724cdce0755899c",
|
||||||
"reference": "7827d55911f91c070fc293ea51a06eec80797d76",
|
"reference": "94871fc0a69c3c5da57764187724cdce0755899c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6224,20 +6283,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-06-18T18:24:02+00:00"
|
"time": "2020-08-13T14:19:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher-contracts",
|
"name": "symfony/event-dispatcher-contracts",
|
||||||
"version": "v2.1.3",
|
"version": "v2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
||||||
"reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b"
|
"reference": "0ba7d54483095a198fa51781bc608d17e84dffa2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f6f613d74cfc5a623fc36294d3451eb7fa5a042b",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2",
|
||||||
"reference": "f6f613d74cfc5a623fc36294d3451eb7fa5a042b",
|
"reference": "0ba7d54483095a198fa51781bc608d17e84dffa2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6250,7 +6309,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -6300,20 +6359,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-06T13:23:11+00:00"
|
"time": "2020-09-07T11:33:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/filesystem",
|
"name": "symfony/filesystem",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/filesystem.git",
|
"url": "https://github.com/symfony/filesystem.git",
|
||||||
"reference": "6e4320f06d5f2cce0d96530162491f4465179157"
|
"reference": "f7b9ed6142a34252d219801d9767dedbd711da1a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/6e4320f06d5f2cce0d96530162491f4465179157",
|
"url": "https://api.github.com/repos/symfony/filesystem/zipball/f7b9ed6142a34252d219801d9767dedbd711da1a",
|
||||||
"reference": "6e4320f06d5f2cce0d96530162491f4465179157",
|
"reference": "f7b9ed6142a34252d219801d9767dedbd711da1a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6364,7 +6423,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:35:19+00:00"
|
"time": "2020-08-21T17:19:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-grapheme",
|
"name": "symfony/polyfill-intl-grapheme",
|
||||||
|
@ -6599,16 +6658,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/service-contracts",
|
||||||
"version": "v2.1.3",
|
"version": "v2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/service-contracts.git",
|
"url": "https://github.com/symfony/service-contracts.git",
|
||||||
"reference": "58c7475e5457c5492c26cc740cc0ad7464be9442"
|
"reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442",
|
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1",
|
||||||
"reference": "58c7475e5457c5492c26cc740cc0ad7464be9442",
|
"reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6621,7 +6680,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -6671,20 +6730,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-06T13:23:11+00:00"
|
"time": "2020-09-07T11:33:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/string",
|
"name": "symfony/string",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/string.git",
|
"url": "https://github.com/symfony/string.git",
|
||||||
"reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b"
|
"reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/string/zipball/f629ba9b611c76224feb21fe2bcbf0b6f992300b",
|
"url": "https://api.github.com/repos/symfony/string/zipball/0de4cc1e18bb596226c06a82e2e7e9bc6001a63a",
|
||||||
"reference": "f629ba9b611c76224feb21fe2bcbf0b6f992300b",
|
"reference": "0de4cc1e18bb596226c06a82e2e7e9bc6001a63a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6756,20 +6815,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-08T08:27:49+00:00"
|
"time": "2020-08-17T07:48:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v4.4.11",
|
"version": "v4.4.13",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "a8ea9d97353294eb6783f2894ef8cee99a045822"
|
"reference": "700e6e50174b0cdcf0fa232773bec5c314680575"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/a8ea9d97353294eb6783f2894ef8cee99a045822",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/700e6e50174b0cdcf0fa232773bec5c314680575",
|
||||||
"reference": "a8ea9d97353294eb6783f2894ef8cee99a045822",
|
"reference": "700e6e50174b0cdcf0fa232773bec5c314680575",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6846,20 +6905,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-23T08:31:43+00:00"
|
"time": "2020-08-17T09:56:45+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation-contracts",
|
"name": "symfony/translation-contracts",
|
||||||
"version": "v2.1.3",
|
"version": "v2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation-contracts.git",
|
"url": "https://github.com/symfony/translation-contracts.git",
|
||||||
"reference": "616a9773c853097607cf9dd6577d5b143ffdcd63"
|
"reference": "77ce1c3627c9f39643acd9af086631f842c50c4d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/616a9773c853097607cf9dd6577d5b143ffdcd63",
|
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/77ce1c3627c9f39643acd9af086631f842c50c4d",
|
||||||
"reference": "616a9773c853097607cf9dd6577d5b143ffdcd63",
|
"reference": "77ce1c3627c9f39643acd9af086631f842c50c4d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6871,7 +6930,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -6921,20 +6980,20 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-06T13:23:11+00:00"
|
"time": "2020-09-07T11:33:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/yaml.git",
|
"url": "https://github.com/symfony/yaml.git",
|
||||||
"reference": "ea342353a3ef4f453809acc4ebc55382231d4d23"
|
"reference": "a44bd3a91bfbf8db12367fa6ffac9c3eb1a8804a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23",
|
"url": "https://api.github.com/repos/symfony/yaml/zipball/a44bd3a91bfbf8db12367fa6ffac9c3eb1a8804a",
|
||||||
"reference": "ea342353a3ef4f453809acc4ebc55382231d4d23",
|
"reference": "a44bd3a91bfbf8db12367fa6ffac9c3eb1a8804a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -6998,7 +7057,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-20T17:43:50+00:00"
|
"time": "2020-08-26T08:30:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "theseer/tokenizer",
|
"name": "theseer/tokenizer",
|
||||||
|
|
1
vendor/blueimp/jquery-file-upload/.github/FUNDING.yml
vendored
Normal file
1
vendor/blueimp/jquery-file-upload/.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
github: [blueimp]
|
84
vendor/blueimp/jquery-file-upload/.github/workflows/test.yml
vendored
Normal file
84
vendor/blueimp/jquery-file-upload/.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
name: Test
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- name: npm install
|
||||||
|
run: npm install
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
- name: lint
|
||||||
|
run: npm run lint
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
mocha:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: chmod
|
||||||
|
run: chmod -R 777 server/php/files
|
||||||
|
- name: docker-compose build
|
||||||
|
run: docker-compose build example mocha
|
||||||
|
- name: mocha
|
||||||
|
run: docker-compose run --rm mocha
|
||||||
|
- name: docker-compose logs
|
||||||
|
if: always()
|
||||||
|
run: docker-compose logs example
|
||||||
|
- name: docker-compose down
|
||||||
|
if: always()
|
||||||
|
run: docker-compose down -v
|
||||||
|
|
||||||
|
wdio-chrome:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: chmod
|
||||||
|
run: chmod -R 777 server/php/files wdio/reports
|
||||||
|
- name: docker-compose build
|
||||||
|
run: docker-compose build example
|
||||||
|
- name: wdio chrome
|
||||||
|
run: docker-compose run --rm wdio
|
||||||
|
- name: docker-compose logs
|
||||||
|
if: always()
|
||||||
|
run: docker-compose logs example
|
||||||
|
- name: docker-compose down
|
||||||
|
if: always()
|
||||||
|
run: docker-compose down -v
|
||||||
|
- name: Upload reports
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: reports
|
||||||
|
path: wdio/reports
|
||||||
|
|
||||||
|
wdio-firefox:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: chmod
|
||||||
|
run: chmod -R 777 server/php/files wdio/reports
|
||||||
|
- name: docker-compose build
|
||||||
|
run: docker-compose build example
|
||||||
|
- name: wdio firefox
|
||||||
|
run: docker-compose run --rm wdio conf/firefox.js
|
||||||
|
- name: docker-compose logs
|
||||||
|
if: always()
|
||||||
|
run: docker-compose logs example
|
||||||
|
- name: docker-compose down
|
||||||
|
if: always()
|
||||||
|
run: docker-compose down -v
|
||||||
|
- name: Upload reports
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: reports
|
||||||
|
path: wdio/reports
|
2
vendor/blueimp/jquery-file-upload/.gitignore
vendored
2
vendor/blueimp/jquery-file-upload/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
.DS_Store
|
|
||||||
*.pyc
|
*.pyc
|
||||||
|
.env
|
||||||
node_modules
|
node_modules
|
||||||
|
|
81
vendor/blueimp/jquery-file-upload/.jshintrc
vendored
81
vendor/blueimp/jquery-file-upload/.jshintrc
vendored
|
@ -1,81 +0,0 @@
|
||||||
{
|
|
||||||
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
|
|
||||||
"camelcase" : true, // true: Identifiers must be in camelCase
|
|
||||||
"curly" : true, // true: Require {} for every new block or scope
|
|
||||||
"eqeqeq" : true, // true: Require triple equals (===) for comparison
|
|
||||||
"forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty()
|
|
||||||
"immed" : true, // true: Require immediate invocations to be wrapped in parens
|
|
||||||
// e.g. `(function () { } ());`
|
|
||||||
"indent" : 4, // {int} Number of spaces to use for indentation
|
|
||||||
"latedef" : true, // true: Require variables/functions to be defined before being used
|
|
||||||
"newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
|
|
||||||
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
|
|
||||||
"noempty" : true, // true: Prohibit use of empty blocks
|
|
||||||
"nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
|
|
||||||
"plusplus" : false, // true: Prohibit use of `++` & `--`
|
|
||||||
"quotmark" : "single", // Quotation mark consistency:
|
|
||||||
// false : do nothing (default)
|
|
||||||
// true : ensure whatever is used is consistent
|
|
||||||
// "single" : require single quotes
|
|
||||||
// "double" : require double quotes
|
|
||||||
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
|
|
||||||
"unused" : true, // true: Require all defined variables be used
|
|
||||||
"strict" : true, // true: Requires all functions run in ES5 Strict Mode
|
|
||||||
"trailing" : true, // true: Prohibit trailing whitespaces
|
|
||||||
"maxparams" : false, // {int} Max number of formal params allowed per function
|
|
||||||
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
|
|
||||||
"maxstatements" : false, // {int} Max number statements per function
|
|
||||||
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
|
|
||||||
"maxlen" : false, // {int} Max number of characters per line
|
|
||||||
|
|
||||||
// Relaxing
|
|
||||||
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
|
|
||||||
"boss" : false, // true: Tolerate assignments where comparisons would be expected
|
|
||||||
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
|
|
||||||
"eqnull" : false, // true: Tolerate use of `== null`
|
|
||||||
"es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
|
|
||||||
"esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`)
|
|
||||||
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
|
|
||||||
// (ex: `for each`, multiple try/catch, function expression…)
|
|
||||||
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
|
|
||||||
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
|
|
||||||
"funcscope" : false, // true: Tolerate defining variables inside control statements"
|
|
||||||
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
|
|
||||||
"iterator" : false, // true: Tolerate using the `__iterator__` property
|
|
||||||
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
|
|
||||||
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
|
|
||||||
"laxcomma" : false, // true: Tolerate comma-first style coding
|
|
||||||
"loopfunc" : false, // true: Tolerate functions being defined in loops
|
|
||||||
"multistr" : false, // true: Tolerate multi-line strings
|
|
||||||
"proto" : false, // true: Tolerate using the `__proto__` property
|
|
||||||
"scripturl" : false, // true: Tolerate script-targeted URLs
|
|
||||||
"smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment
|
|
||||||
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
|
|
||||||
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
|
|
||||||
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
|
|
||||||
"validthis" : false, // true: Tolerate using this in a non-constructor function
|
|
||||||
|
|
||||||
// Environments
|
|
||||||
"browser" : false, // Web Browser (window, document, etc)
|
|
||||||
"couch" : false, // CouchDB
|
|
||||||
"devel" : false, // Development/debugging (alert, confirm, etc)
|
|
||||||
"dojo" : false, // Dojo Toolkit
|
|
||||||
"jquery" : false, // jQuery
|
|
||||||
"mootools" : false, // MooTools
|
|
||||||
"node" : false, // Node.js
|
|
||||||
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
|
|
||||||
"prototypejs" : false, // Prototype and Scriptaculous
|
|
||||||
"rhino" : false, // Rhino
|
|
||||||
"worker" : false, // Web Workers
|
|
||||||
"wsh" : false, // Windows Scripting Host
|
|
||||||
"yui" : false, // Yahoo User Interface
|
|
||||||
|
|
||||||
// Legacy
|
|
||||||
"nomen" : true, // true: Prohibit dangling `_` in variables
|
|
||||||
"onevar" : true, // true: Allow only one `var` statement per function
|
|
||||||
"passfail" : false, // true: Stop on first error
|
|
||||||
"white" : true, // true: Check against strict whitespace and indentation rules
|
|
||||||
|
|
||||||
// Custom Globals
|
|
||||||
"globals" : {} // additional predefined global variables
|
|
||||||
}
|
|
20
vendor/blueimp/jquery-file-upload/.npmignore
vendored
20
vendor/blueimp/jquery-file-upload/.npmignore
vendored
|
@ -1,20 +0,0 @@
|
||||||
*
|
|
||||||
!css/jquery.fileupload-noscript.css
|
|
||||||
!css/jquery.fileupload-ui-noscript.css
|
|
||||||
!css/jquery.fileupload-ui.css
|
|
||||||
!css/jquery.fileupload.css
|
|
||||||
!img/loading.gif
|
|
||||||
!img/progressbar.gif
|
|
||||||
!js/cors/jquery.postmessage-transport.js
|
|
||||||
!js/cors/jquery.xdr-transport.js
|
|
||||||
!js/vendor/jquery.ui.widget.js
|
|
||||||
!js/jquery.fileupload-angular.js
|
|
||||||
!js/jquery.fileupload-audio.js
|
|
||||||
!js/jquery.fileupload-image.js
|
|
||||||
!js/jquery.fileupload-jquery-ui.js
|
|
||||||
!js/jquery.fileupload-process.js
|
|
||||||
!js/jquery.fileupload-ui.js
|
|
||||||
!js/jquery.fileupload-validate.js
|
|
||||||
!js/jquery.fileupload-video.js
|
|
||||||
!js/jquery.fileupload.js
|
|
||||||
!js/jquery.iframe-transport.js
|
|
|
@ -1,15 +0,0 @@
|
||||||
Please follow these pull request guidelines:
|
|
||||||
|
|
||||||
1. Update your fork to the latest upstream version.
|
|
||||||
|
|
||||||
2. Follow the coding conventions of the original source files (indentation, spaces, brackets layout).
|
|
||||||
|
|
||||||
3. Code changes must pass JSHint validation with the `.jshintrc` settings of this project.
|
|
||||||
|
|
||||||
4. Code changes must pass the QUnit tests defined in the `test` folder.
|
|
||||||
|
|
||||||
5. New features should be covered by accompanying QUnit tests.
|
|
||||||
|
|
||||||
6. Keep your commits as atomic as possible, i.e. create a new commit for every single bug fix or feature added.
|
|
||||||
|
|
||||||
7. Always add meaningful commit messages.
|
|
23
vendor/blueimp/jquery-file-upload/LICENSE.txt
vendored
23
vendor/blueimp/jquery-file-upload/LICENSE.txt
vendored
|
@ -2,20 +2,19 @@ MIT License
|
||||||
|
|
||||||
Copyright © 2010 Sebastian Tschan, https://blueimp.net
|
Copyright © 2010 Sebastian Tschan, https://blueimp.net
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
in the Software without restriction, including without limitation the rights
|
the Software without restriction, including without limitation the rights to
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
furnished to do so, subject to the following conditions:
|
subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
SOFTWARE.
|
|
||||||
|
|
265
vendor/blueimp/jquery-file-upload/README.md
vendored
265
vendor/blueimp/jquery-file-upload/README.md
vendored
|
@ -1,121 +1,224 @@
|
||||||
# jQuery File Upload Plugin
|
# jQuery File Upload
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
- [Description](#description)
|
||||||
|
- [Demo](#demo)
|
||||||
|
- [Features](#features)
|
||||||
|
- [Security](#security)
|
||||||
|
- [Setup](#setup)
|
||||||
|
- [Requirements](#requirements)
|
||||||
|
- [Mandatory requirements](#mandatory-requirements)
|
||||||
|
- [Optional requirements](#optional-requirements)
|
||||||
|
- [Cross-domain requirements](#cross-domain-requirements)
|
||||||
|
- [Browsers](#browsers)
|
||||||
|
- [Desktop browsers](#desktop-browsers)
|
||||||
|
- [Mobile browsers](#mobile-browsers)
|
||||||
|
- [Extended browser support information](#extended-browser-support-information)
|
||||||
|
- [Testing](#testing)
|
||||||
|
- [Support](#support)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
## Description
|
## 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.
|
> 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.
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
[Demo File Upload](https://blueimp.github.io/jQuery-File-Upload/)
|
[Demo File Upload](https://blueimp.github.io/jQuery-File-Upload/)
|
||||||
|
|
||||||
## ⚠️ Security Notice
|
## Features
|
||||||
Security related releases:
|
|
||||||
|
|
||||||
* [v9.25.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.25.1) Mitigates some [Potential vulnerabilities with PHP+ImageMagick](VULNERABILITIES.md#potential-vulnerabilities-with-php-imagemagick).
|
- **Multiple file upload:**
|
||||||
* [v9.24.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.24.1) Fixes a [Remote code execution vulnerability in the PHP component](VULNERABILITIES.md#remote-code-execution-vulnerability-in-the-php-component).
|
Allows to select multiple files at once and upload them simultaneously.
|
||||||
* v[9.10.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/9.10.1) Fixes an [Open redirect vulnerability in the GAE components](VULNERABILITIES.md#open-redirect-vulnerability-in-the-gae-components).
|
- **Drag & Drop support:**
|
||||||
* Commit [4175032](https://github.com/blueimp/jQuery-File-Upload/commit/41750323a464e848856dc4c5c940663498beb74a) (*fixed in all tagged releases*) Fixes a [Cross-site scripting vulnerability in the Iframe Transport](VULNERABILITIES.md#cross-site-scripting-vulnerability-in-the-iframe-transport).
|
Allows to upload files by dragging them from your desktop or file manager 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.
|
||||||
|
|
||||||
Please read the [SECURITY](SECURITY.md) document for instructions on how to securely configure your Webserver for file uploads.
|
## Security
|
||||||
|
|
||||||
|
⚠️ Please read the [VULNERABILITIES](VULNERABILITIES.md) document for a list of
|
||||||
|
fixed vulnerabilities
|
||||||
|
|
||||||
|
Please also read the [SECURITY](SECURITY.md) document for instructions on how to
|
||||||
|
securely configure your Web server for file uploads.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
* [How to setup the plugin on your website](https://github.com/blueimp/jQuery-File-Upload/wiki/Setup)
|
|
||||||
* [How to use only the basic plugin (minimal setup guide).](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
|
|
||||||
|
|
||||||
## Features
|
jQuery File Upload can be installed via [NPM](https://www.npmjs.com/):
|
||||||
* **Multiple file upload:**
|
|
||||||
Allows to select multiple files at once and upload them simultaneously.
|
```sh
|
||||||
* **Drag & Drop support:**
|
npm install blueimp-file-upload
|
||||||
Allows to upload files by dragging them from your desktop or file manager 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.
|
This allows you to include [jquery.fileupload.js](js/jquery.fileupload.js) and
|
||||||
* **Cancelable uploads:**
|
its extensions via `node_modules`, e.g:
|
||||||
Individual file uploads can be canceled to stop the upload progress.
|
|
||||||
* **Resumable uploads:**
|
```html
|
||||||
Aborted uploads can be resumed with browsers supporting the Blob API.
|
<script src="node_modules/blueimp-file-upload/js/jquery.fileupload.js"></script>
|
||||||
* **Chunked uploads:**
|
```
|
||||||
Large files can be uploaded in smaller chunks with browsers supporting the Blob API.
|
|
||||||
* **Client-side image resizing:**
|
The widget can then be initialized on a file upload form the following way:
|
||||||
Images can be automatically resized on client-side with browsers supporting the required JS APIs.
|
|
||||||
* **Preview images, audio and video:**
|
```js
|
||||||
A preview of image, audio and video files can be displayed before uploading with browsers supporting the required APIs.
|
$('#fileupload').fileupload();
|
||||||
* **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:**
|
For further information, please refer to the following guides:
|
||||||
Uploads files via XMLHttpRequests if supported and uses iframes as fallback for legacy browsers.
|
|
||||||
* **HTML file upload form fallback:**
|
- [Main documentation page](https://github.com/blueimp/jQuery-File-Upload/wiki)
|
||||||
Allows progressive enhancement by using a standard HTML file upload form as widget element.
|
- [List of all available Options](https://github.com/blueimp/jQuery-File-Upload/wiki/Options)
|
||||||
* **Cross-site file uploads:**
|
- [The plugin API](https://github.com/blueimp/jQuery-File-Upload/wiki/API)
|
||||||
Supports uploading files to a different domain with cross-site XMLHttpRequests or iframe redirects.
|
- [How to setup the plugin on your website](https://github.com/blueimp/jQuery-File-Upload/wiki/Setup)
|
||||||
* **Multiple plugin instances:**
|
- [How to use only the basic plugin.](https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin)
|
||||||
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
|
## Requirements
|
||||||
|
|
||||||
### Mandatory requirements
|
### Mandatory requirements
|
||||||
* [jQuery](https://jquery.com/) v. 1.6+
|
|
||||||
* [jQuery UI widget factory](https://api.jqueryui.com/jQuery.widget/) v. 1.9+ (included): Required for the basic File Upload plugin, but very lightweight without any other dependencies from the jQuery UI suite.
|
- [jQuery](https://jquery.com/) v1.7+
|
||||||
* [jQuery Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js) (included): Required for [browsers without XHR file upload support](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
- [jQuery UI widget factory](https://api.jqueryui.com/jQuery.widget/) v1.9+
|
||||||
|
(included): Required for the basic File Upload plugin, but very lightweight
|
||||||
|
without any other dependencies from the jQuery UI suite.
|
||||||
|
- [jQuery Iframe Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/jquery.iframe-transport.js)
|
||||||
|
(included): Required for
|
||||||
|
[browsers without XHR file upload support](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||||
|
|
||||||
### Optional requirements
|
### Optional requirements
|
||||||
* [JavaScript Templates engine](https://github.com/blueimp/JavaScript-Templates) v. 2.5.4+: Used to render the selected and uploaded files for the Basic Plus UI and jQuery UI versions.
|
|
||||||
* [JavaScript Load Image library](https://github.com/blueimp/JavaScript-Load-Image) v. 1.13.0+: Required for the image previews and resizing functionality.
|
|
||||||
* [JavaScript Canvas to Blob polyfill](https://github.com/blueimp/JavaScript-Canvas-to-Blob) v. 2.1.1+:Required for the image previews and resizing functionality.
|
|
||||||
* [blueimp Gallery](https://github.com/blueimp/Gallery) v. 2.15.1+: Used to display the uploaded images in a lightbox.
|
|
||||||
* [Bootstrap](http://getbootstrap.com/) v. 3.2.0+
|
|
||||||
* [Glyphicons](http://glyphicons.com/)
|
|
||||||
|
|
||||||
The user interface of all versions, except the jQuery UI version, is built with [Bootstrap](http://getbootstrap.com/) and icons from [Glyphicons](http://glyphicons.com/).
|
- [JavaScript Templates engine](https://github.com/blueimp/JavaScript-Templates)
|
||||||
|
v3+: Used to render the selected and uploaded files.
|
||||||
|
- [JavaScript Load Image library](https://github.com/blueimp/JavaScript-Load-Image)
|
||||||
|
v2+: Required for the image previews and resizing functionality.
|
||||||
|
- [JavaScript Canvas to Blob polyfill](https://github.com/blueimp/JavaScript-Canvas-to-Blob)
|
||||||
|
v3+:Required for the resizing functionality.
|
||||||
|
- [blueimp Gallery](https://github.com/blueimp/Gallery) v2+: Used to display the
|
||||||
|
uploaded images in a lightbox.
|
||||||
|
- [Bootstrap](https://getbootstrap.com/) v3+: Used for the demo design.
|
||||||
|
- [Glyphicons](https://glyphicons.com/) Icon set used by Bootstrap.
|
||||||
|
|
||||||
### Cross-domain requirements
|
### Cross-domain requirements
|
||||||
[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.
|
|
||||||
|
|
||||||
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).
|
[Cross-domain File Uploads](https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads)
|
||||||
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.
|
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.
|
||||||
|
|
||||||
### Custom Backends
|
The repository also includes the
|
||||||
|
[jQuery XDomainRequest Transport plugin](https://github.com/blueimp/jQuery-File-Upload/blob/master/js/cors/jquery.xdr-transport.js),
|
||||||
You can add support for various backends by adhering to the specification [outlined here](https://github.com/blueimp/jQuery-File-Upload/wiki/JSON-Response).
|
which enables limited cross-domain AJAX requests in Microsoft Internet Explorer
|
||||||
|
8 and 9 (IE 10 supports cross-domain XHR requests).
|
||||||
|
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.
|
||||||
|
|
||||||
## Browsers
|
## Browsers
|
||||||
|
|
||||||
### Desktop browsers
|
### Desktop browsers
|
||||||
The File Upload plugin is regularly tested with the latest browser versions and supports the following minimal versions:
|
|
||||||
|
|
||||||
* Google Chrome
|
The File Upload plugin is regularly tested with the latest browser versions and
|
||||||
* Apple Safari 4.0+
|
supports the following minimal versions:
|
||||||
* Mozilla Firefox 3.0+
|
|
||||||
* Opera 11.0+
|
- Google Chrome
|
||||||
* Microsoft Internet Explorer 6.0+
|
- Apple Safari 4.0+
|
||||||
|
- Mozilla Firefox 3.0+
|
||||||
|
- Opera 11.0+
|
||||||
|
- Microsoft Internet Explorer 6.0+
|
||||||
|
|
||||||
### Mobile browsers
|
### Mobile browsers
|
||||||
The File Upload plugin has been tested with and supports the following mobile browsers:
|
|
||||||
|
|
||||||
* Apple Safari on iOS 6.0+ (see Caveats below)
|
The File Upload plugin has been tested with and supports the following mobile
|
||||||
* Google Chrome on iOS 6.0+ (see Caveats below)
|
browsers:
|
||||||
* Google Chrome on Android 4.0+
|
|
||||||
* Default Browser on Android 2.3+
|
|
||||||
* Opera Mobile 12.0+
|
|
||||||
|
|
||||||
### Caveats
|
- 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+
|
||||||
|
|
||||||
- iOS 9 has a [known bug](https://apple.stackexchange.com/questions/118154) where photos chosen from the Photo Library are all given the name `image.jpeg`, which is problematic when uploading multiple files at a time. Ideally your server should be responsible for deduplicating file uploads ([example](https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php#L490)). If you don't have control, as in the case of direct uploads to S3, you can pass an option `uniqueFilenames: {}` as part of the options object, which tells the uploader to deduplicate filenames. More details [here](https://github.com/blueimp/jQuery-File-Upload/commit/d419f43478aeafe95a794815f80a3016f58eb3b7).
|
### Extended browser support information
|
||||||
|
|
||||||
### Supported features
|
For a detailed overview of the features supported by each browser version and
|
||||||
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).
|
known operating system / browser bugs, please have a look at the
|
||||||
|
[Extended browser support information](https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support).
|
||||||
|
|
||||||
## Contributing
|
## Testing
|
||||||
**Bug fixes** and **new features** can be proposed using [pull requests](https://github.com/blueimp/jQuery-File-Upload/pulls).
|
|
||||||
Please read the [contribution guidelines](https://github.com/blueimp/jQuery-File-Upload/blob/master/CONTRIBUTING.md) before submitting a pull request.
|
The project comes with three sets of tests:
|
||||||
|
|
||||||
|
1. Code linting using [ESLint](https://eslint.org/).
|
||||||
|
2. Unit tests using [Mocha](https://mochajs.org/).
|
||||||
|
3. End-to-end tests using [blueimp/wdio](https://github.com/blueimp/wdio).
|
||||||
|
|
||||||
|
To run the tests, follow these steps:
|
||||||
|
|
||||||
|
1. Start [Docker](https://docs.docker.com/).
|
||||||
|
2. Install development dependencies:
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
3. Run the tests:
|
||||||
|
```sh
|
||||||
|
npm test
|
||||||
|
```
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
This project is actively maintained, but there is no official support channel.
|
This project is actively maintained, but there is no official support channel.
|
||||||
If you have a question that another developer might help you with, please post to [Stack Overflow](http://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload) and tag your question with `blueimp jquery file upload`.
|
If you have a question that another developer might help you with, please post
|
||||||
|
to
|
||||||
|
[Stack Overflow](https://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload)
|
||||||
|
and tag your question with `blueimp jquery file upload`.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Released under the [MIT license](https://opensource.org/licenses/MIT).
|
Released under the [MIT license](https://opensource.org/licenses/MIT).
|
||||||
|
|
188
vendor/blueimp/jquery-file-upload/SECURITY.md
vendored
188
vendor/blueimp/jquery-file-upload/SECURITY.md
vendored
|
@ -1,97 +1,182 @@
|
||||||
# File Upload Security
|
# File Upload Security
|
||||||
For an in-depth understanding of the potential security risks of providing file uploads and possible mitigations, please refer to the [OWASP - Unrestricted File Upload](https://www.owasp.org/index.php/Unrestricted_File_Upload) documentation.
|
|
||||||
|
|
||||||
To securely setup the project to serve uploaded files, please refer to the sample [Secure file upload serving configurations](#secure-file-upload-serving-configurations).
|
## Contents
|
||||||
|
|
||||||
To mitigate potential vulnerabilities in image processing libraries, please refer to the [Secure image processing configurations](#secure-image-processing-configurations).
|
- [Introduction](#introduction)
|
||||||
|
- [Purpose of this project](#purpose-of-this-project)
|
||||||
|
- [Mitigations against file upload risks](#mitigations-against-file-upload-risks)
|
||||||
|
- [Prevent code execution on the server](#prevent-code-execution-on-the-server)
|
||||||
|
- [Prevent code execution in the browser](#prevent-code-execution-in-the-browser)
|
||||||
|
- [Prevent distribution of malware](#prevent-distribution-of-malware)
|
||||||
|
- [Secure file upload serving configurations](#secure-file-upload-serving-configurations)
|
||||||
|
- [Apache config](#apache-config)
|
||||||
|
- [NGINX config](#nginx-config)
|
||||||
|
- [Secure image processing configurations](#secure-image-processing-configurations)
|
||||||
|
- [ImageMagick config](#imagemagick-config)
|
||||||
|
|
||||||
By default, all sample upload handlers allow only upload of image files, which mitigates some attack vectors, but should not be relied on as the only protection.
|
## Introduction
|
||||||
|
|
||||||
Please also have a look at the [list of fixed vulnerabilities](VULNERABILITIES.md) in jQuery File Upload, which relates mostly to the sample server-side upload handlers and how they have been configured.
|
For an in-depth understanding of the potential security risks of providing file
|
||||||
|
uploads and possible mitigations, please refer to the
|
||||||
|
[OWASP - Unrestricted File Upload](https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload)
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
To securely setup the project to serve uploaded files, please refer to the
|
||||||
|
sample
|
||||||
|
[Secure file upload serving configurations](#secure-file-upload-serving-configurations).
|
||||||
|
|
||||||
|
To mitigate potential vulnerabilities in image processing libraries, please
|
||||||
|
refer to the
|
||||||
|
[Secure image processing configurations](#secure-image-processing-configurations).
|
||||||
|
|
||||||
|
By default, all sample upload handlers allow only upload of image files, which
|
||||||
|
mitigates some attack vectors, but should not be relied on as the only
|
||||||
|
protection.
|
||||||
|
|
||||||
|
Please also have a look at the
|
||||||
|
[list of fixed vulnerabilities](VULNERABILITIES.md) in jQuery File Upload, which
|
||||||
|
relates mostly to the sample server-side upload handlers and how they have been
|
||||||
|
configured.
|
||||||
|
|
||||||
## Purpose of this project
|
## Purpose of this project
|
||||||
Please note that this project is not a complete file management product, but foremost a client-side file upload library for [jQuery](https://jquery.com/).
|
|
||||||
The server-side sample upload handlers are just examples to demonstrate the client-side file upload functionality.
|
Please note that this project is not a complete file management product, but
|
||||||
|
foremost a client-side file upload library for [jQuery](https://jquery.com/).
|
||||||
|
The server-side sample upload handlers are just examples to demonstrate the
|
||||||
|
client-side file upload functionality.
|
||||||
|
|
||||||
To make this very clear, there is **no user authentication** by default:
|
To make this very clear, there is **no user authentication** by default:
|
||||||
* **everyone can upload files**
|
|
||||||
* **everyone can delete uploaded files**
|
|
||||||
|
|
||||||
In some cases this can be acceptable, but for most projects you will want to extend the sample upload handlers to integrate user authentication, or implement your own.
|
- **everyone can upload files**
|
||||||
|
- **everyone can delete uploaded files**
|
||||||
|
|
||||||
It is also up to you to configure your Webserver to securely serve the uploaded files, e.g. using the [sample server configurations](#secure-file-upload-serving-configurations).
|
In some cases this can be acceptable, but for most projects you will want to
|
||||||
|
extend the sample upload handlers to integrate user authentication, or implement
|
||||||
|
your own.
|
||||||
|
|
||||||
|
It is also up to you to configure your web server to securely serve the uploaded
|
||||||
|
files, e.g. using the
|
||||||
|
[sample server configurations](#secure-file-upload-serving-configurations).
|
||||||
|
|
||||||
## Mitigations against file upload risks
|
## Mitigations against file upload risks
|
||||||
|
|
||||||
### Prevent code execution on the server
|
### Prevent code execution on the server
|
||||||
To prevent execution of scripts or binaries on server-side, the upload directory must be configured to not execute files in the upload directory (e.g. `server/php/files` as the default for the PHP upload handler) and only treat uploaded files as static content.
|
|
||||||
|
|
||||||
The recommended way to do this is to configure the upload directory path to point outside of the web application root.
|
To prevent execution of scripts or binaries on server-side, the upload directory
|
||||||
Then the Webserver can be configured to serve files from the upload directory with their default static files handler only.
|
must be configured to not execute files in the upload directory (e.g.
|
||||||
|
`server/php/files` as the default for the PHP upload handler) and only treat
|
||||||
|
uploaded files as static content.
|
||||||
|
|
||||||
Limiting file uploads to a whitelist of safe file types (e.g. image files) also mitigates this issue, but should not be the only protection.
|
The recommended way to do this is to configure the upload directory path to
|
||||||
|
point outside of the web application root.
|
||||||
|
Then the web server can be configured to serve files from the upload directory
|
||||||
|
with their default static files handler only.
|
||||||
|
|
||||||
|
Limiting file uploads to a whitelist of safe file types (e.g. image files) also
|
||||||
|
mitigates this issue, but should not be the only protection.
|
||||||
|
|
||||||
### Prevent code execution in the browser
|
### Prevent code execution in the browser
|
||||||
To prevent execution of scripts on client-side, the following headers must
|
|
||||||
be sent when delivering generic uploaded files to the client:
|
To prevent execution of scripts on client-side, the following headers must be
|
||||||
|
sent when delivering generic uploaded files to the client:
|
||||||
|
|
||||||
```
|
```
|
||||||
Content-Type: application/octet-stream
|
Content-Type: application/octet-stream
|
||||||
X-Content-Type-Options: nosniff
|
X-Content-Type-Options: nosniff
|
||||||
```
|
```
|
||||||
|
|
||||||
The `Content-Type: application/octet-stream` header instructs browsers to display a download dialog instead of parsing it and possibly executing script content e.g. in HTML files.
|
The `Content-Type: application/octet-stream` header instructs browsers to
|
||||||
|
display a download dialog instead of parsing it and possibly executing script
|
||||||
|
content e.g. in HTML files.
|
||||||
|
|
||||||
The `X-Content-Type-Options: nosniff` header prevents browsers to try to detect the file mime type despite the given content-type header.
|
The `X-Content-Type-Options: nosniff` header prevents browsers to try to detect
|
||||||
|
the file mime type despite the given content-type header.
|
||||||
|
|
||||||
For known safe files, the content-type header can be adjusted using a **whitelist**, e.g. sending `Content-Type: image/png` for PNG files.
|
For known safe files, the content-type header can be adjusted using a
|
||||||
|
**whitelist**, e.g. sending `Content-Type: image/png` for PNG files.
|
||||||
|
|
||||||
### Prevent distribution of malware
|
### Prevent distribution of malware
|
||||||
To prevent attackers from uploading and distributing malware (e.g. computer viruses), it is recommended to limit file uploads only to a whitelist of safe file types.
|
|
||||||
|
|
||||||
Please note that the detection of file types in the sample file upload handlers is based on the file extension and not the actual file content. This makes it still possible for attackers to upload malware by giving their files an image file extension, but should prevent automatic execution on client computers when opening those files.
|
To prevent attackers from uploading and distributing malware (e.g. computer
|
||||||
|
viruses), it is recommended to limit file uploads only to a whitelist of safe
|
||||||
|
file types.
|
||||||
|
|
||||||
It does not protect at all from exploiting vulnerabilities in image display programs, nor from users renaming file extensions to inadvertently execute the contained malicious code.
|
Please note that the detection of file types in the sample file upload handlers
|
||||||
|
is based on the file extension and not the actual file content. This makes it
|
||||||
|
still possible for attackers to upload malware by giving their files an image
|
||||||
|
file extension, but should prevent automatic execution on client computers when
|
||||||
|
opening those files.
|
||||||
|
|
||||||
|
It does not protect at all from exploiting vulnerabilities in image display
|
||||||
|
programs, nor from users renaming file extensions to inadvertently execute the
|
||||||
|
contained malicious code.
|
||||||
|
|
||||||
## Secure file upload serving configurations
|
## Secure file upload serving configurations
|
||||||
The following configurations serve uploaded files as static files with the proper headers as [mitigation against file upload risks](#mitigations-against-file-upload-risks).
|
|
||||||
Please do not simply copy&paste these configurations, but make sure you understand what they are doing and that you have implemented them correctly.
|
The following configurations serve uploaded files as static files with the
|
||||||
|
proper headers as
|
||||||
|
[mitigation against file upload risks](#mitigations-against-file-upload-risks).
|
||||||
|
Please do not simply copy&paste these configurations, but make sure you
|
||||||
|
understand what they are doing and that you have implemented them correctly.
|
||||||
|
|
||||||
> Always test your own setup and make sure that it is secure!
|
> Always test your own setup and make sure that it is secure!
|
||||||
|
|
||||||
e.g. try uploading PHP scripts (as "example.php", "example.php.png" and "example.png") to see if they get executed by your Webserver.
|
e.g. try uploading PHP scripts (as "example.php", "example.php.png" and
|
||||||
|
"example.png") to see if they get executed by your web server, e.g. the content
|
||||||
|
of the following sample:
|
||||||
|
|
||||||
|
```php
|
||||||
|
GIF89ad <?php echo mime_content_type(__FILE__); phpinfo();
|
||||||
|
```
|
||||||
|
|
||||||
### Apache config
|
### Apache config
|
||||||
Add the following directive to the Apache config, replacing the directory path with the absolute path to the upload directory:
|
|
||||||
|
Add the following directive to the Apache config (e.g.
|
||||||
|
/etc/apache2/apache2.conf), replacing the directory path with the absolute path
|
||||||
|
to the upload directory:
|
||||||
|
|
||||||
```ApacheConf
|
```ApacheConf
|
||||||
<Directory "/path/to/project/server/php/files">
|
<Directory "/path/to/project/server/php/files">
|
||||||
# To enable the Headers module, execute the following command and reload Apache:
|
# Some of the directives require the Apache Headers module. If it is not
|
||||||
|
# already enabled, please execute the following command and reload Apache:
|
||||||
# sudo a2enmod headers
|
# sudo a2enmod headers
|
||||||
|
#
|
||||||
|
# Please note that the order of directives across configuration files matters,
|
||||||
|
# see also:
|
||||||
|
# https://httpd.apache.org/docs/current/sections.html#merging
|
||||||
|
|
||||||
# The following directives prevent the execution of script files
|
# The following directive matches all files and forces them to be handled as
|
||||||
# in the context of the website.
|
# static content, which prevents the server from parsing and executing files
|
||||||
# They also force the content-type application/octet-stream and
|
# that are associated with a dynamic runtime, e.g. PHP files.
|
||||||
# force browsers to display a download dialog for non-image files.
|
# It also forces their Content-Type header to "application/octet-stream" and
|
||||||
SetHandler default-handler
|
# adds a "Content-Disposition: attachment" header to force a download dialog,
|
||||||
ForceType application/octet-stream
|
# which prevents browsers from interpreting files in the context of the
|
||||||
Header set Content-Disposition attachment
|
# web server, e.g. HTML files containing JavaScript.
|
||||||
|
# Lastly it also prevents browsers from MIME-sniffing the Content-Type,
|
||||||
|
# preventing them from interpreting a file as a different Content-Type than
|
||||||
|
# the one sent by the webserver.
|
||||||
|
<FilesMatch ".*">
|
||||||
|
SetHandler default-handler
|
||||||
|
ForceType application/octet-stream
|
||||||
|
Header set Content-Disposition attachment
|
||||||
|
Header set X-Content-Type-Options nosniff
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
# The following unsets the forced type and Content-Disposition headers
|
# The following directive matches known image files and unsets the forced
|
||||||
# for known image files:
|
# Content-Type so they can be served with their original mime type.
|
||||||
<FilesMatch "(?i)\.(gif|jpe?g|png)$">
|
# It also unsets the Content-Disposition header to allow displaying them
|
||||||
|
# inline in the browser.
|
||||||
|
<FilesMatch ".+\.(?i:(gif|jpe?g|png))$">
|
||||||
ForceType none
|
ForceType none
|
||||||
Header unset Content-Disposition
|
Header unset Content-Disposition
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
# The following directive prevents browsers from MIME-sniffing the content-type.
|
|
||||||
# This is an important complement to the ForceType directive above:
|
|
||||||
Header set X-Content-Type-Options nosniff
|
|
||||||
</Directory>
|
</Directory>
|
||||||
```
|
```
|
||||||
|
|
||||||
### NGINX config
|
### NGINX config
|
||||||
Add the following directive to the NGINX config, replacing the directory path with the absolute path to the upload directory:
|
|
||||||
|
Add the following directive to the NGINX config, replacing the directory path
|
||||||
|
with the absolute path to the upload directory:
|
||||||
|
|
||||||
```Nginx
|
```Nginx
|
||||||
location ^~ /path/to/project/server/php/files {
|
location ^~ /path/to/project/server/php/files {
|
||||||
|
@ -113,13 +198,22 @@ location ^~ /path/to/project/server/php/files {
|
||||||
```
|
```
|
||||||
|
|
||||||
## Secure image processing configurations
|
## Secure image processing configurations
|
||||||
The following configuration mitigates [potential image processing vulnerabilities with ImageMagick](VULNERABILITIES.md#potential-vulnerabilities-with-php-imagemagick) by limiting the attack vectors to a small subset of image types (`GIF/JPEG/PNG`).
|
|
||||||
|
|
||||||
Please also consider using alternative, safer image processing libraries like [libvips](https://github.com/libvips/libvips) or [imageflow](https://github.com/imazen/imageflow).
|
The following configuration mitigates
|
||||||
|
[potential image processing vulnerabilities with ImageMagick](VULNERABILITIES.md#potential-vulnerabilities-with-php-imagemagick)
|
||||||
|
by limiting the attack vectors to a small subset of image types
|
||||||
|
(`GIF/JPEG/PNG`).
|
||||||
|
|
||||||
|
Please also consider using alternative, safer image processing libraries like
|
||||||
|
[libvips](https://github.com/libvips/libvips) or
|
||||||
|
[imageflow](https://github.com/imazen/imageflow).
|
||||||
|
|
||||||
## ImageMagick config
|
## ImageMagick config
|
||||||
It is recommended to disable all non-required ImageMagick coders via [policy.xml](https://wiki.debian.org/imagemagick/security).
|
|
||||||
To do so, locate the ImageMagick `policy.xml` configuration file and add the following policies:
|
It is recommended to disable all non-required ImageMagick coders via
|
||||||
|
[policy.xml](https://wiki.debian.org/imagemagick/security).
|
||||||
|
To do so, locate the ImageMagick `policy.xml` configuration file and add the
|
||||||
|
following policies:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
121
vendor/blueimp/jquery-file-upload/VULNERABILITIES.md
vendored
121
vendor/blueimp/jquery-file-upload/VULNERABILITIES.md
vendored
|
@ -1,65 +1,118 @@
|
||||||
# ⚠️ List of fixed vulnerabilities
|
# List of fixed vulnerabilities
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
- [Potential vulnerabilities with PHP+ImageMagick](#potential-vulnerabilities-with-phpimagemagick)
|
||||||
|
- [Remote code execution vulnerability in the PHP component](#remote-code-execution-vulnerability-in-the-php-component)
|
||||||
|
- [Open redirect vulnerability in the GAE components](#open-redirect-vulnerability-in-the-gae-components)
|
||||||
|
- [Cross-site scripting vulnerability in the Iframe Transport](#cross-site-scripting-vulnerability-in-the-iframe-transport)
|
||||||
|
|
||||||
## Potential vulnerabilities with PHP+ImageMagick
|
## Potential vulnerabilities with PHP+ImageMagick
|
||||||
|
|
||||||
> Mitigated: 2018-10-25 (GMT)
|
> Mitigated: 2018-10-25 (GMT)
|
||||||
|
|
||||||
The sample [PHP upload handler](server/php/UploadHandler.php) before [v9.25.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.25.1) did not validate file signatures before invoking [ImageMagick](https://www.imagemagick.org/) (via [Imagick](http://php.net/manual/en/book.imagick.php)).
|
The sample [PHP upload handler](server/php/UploadHandler.php) before
|
||||||
Verifying those [magic bytes](https://en.wikipedia.org/wiki/List_of_file_signatures) mitigates potential vulnerabilities when handling input files other than `GIF/JPEG/PNG`.
|
[v9.25.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.25.1)
|
||||||
|
did not validate file signatures before invoking
|
||||||
|
[ImageMagick](https://www.imagemagick.org/) (via
|
||||||
|
[Imagick](https://php.net/manual/en/book.imagick.php)).
|
||||||
|
Verifying those
|
||||||
|
[magic bytes](https://en.wikipedia.org/wiki/List_of_file_signatures) mitigates
|
||||||
|
potential vulnerabilities when handling input files other than `GIF/JPEG/PNG`.
|
||||||
|
|
||||||
Please also configure ImageMagick to only enable the coders required for `GIF/JPEG/PNG` processing, e.g. with the sample [ImageMagick config](SECURITY.md#imagemagick-config).
|
Please also configure ImageMagick to only enable the coders required for
|
||||||
|
`GIF/JPEG/PNG` processing, e.g. with the sample
|
||||||
|
[ImageMagick config](SECURITY.md#imagemagick-config).
|
||||||
|
|
||||||
**Further information:**
|
**Further information:**
|
||||||
* Commit containing the mitigation: [fe44d34](https://github.com/blueimp/jQuery-File-Upload/commit/fe44d34be43be32c6b8d507932f318dababb25dd)
|
|
||||||
* [ImageTragick](https://imagetragick.com/)
|
- Commit containing the mitigation:
|
||||||
* [CERT Vulnerability Note VU#332928](https://www.kb.cert.org/vuls/id/332928)
|
[fe44d34](https://github.com/blueimp/jQuery-File-Upload/commit/fe44d34be43be32c6b8d507932f318dababb25dd)
|
||||||
* [ImageMagick CVE entries](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=imagemagick)
|
- [ImageTragick](https://imagetragick.com/)
|
||||||
|
- [CERT Vulnerability Note VU#332928](https://www.kb.cert.org/vuls/id/332928)
|
||||||
|
- [ImageMagick CVE entries](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=imagemagick)
|
||||||
|
|
||||||
## Remote code execution vulnerability in the PHP component
|
## Remote code execution vulnerability in the PHP component
|
||||||
|
|
||||||
> Fixed: 2018-10-23 (GMT)
|
> Fixed: 2018-10-23 (GMT)
|
||||||
|
|
||||||
The sample [PHP upload handler](server/php/UploadHandler.php) before [v9.24.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.24.1) allowed to upload all file types by default.
|
The sample [PHP upload handler](server/php/UploadHandler.php) before
|
||||||
This opens up a remote code execution vulnerability, unless the server is configured to not execute (PHP) files in the upload directory (`server/php/files`).
|
[v9.24.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/v9.24.1)
|
||||||
|
allowed to upload all file types by default.
|
||||||
|
This opens up a remote code execution vulnerability, unless the server is
|
||||||
|
configured to not execute (PHP) files in the upload directory
|
||||||
|
(`server/php/files`).
|
||||||
|
|
||||||
The provided [.htaccess](server/php/files/.htaccess) file includes instructions for Apache to disable script execution, however [.htaccess support](https://httpd.apache.org/docs/current/howto/htaccess.html) is disabled by default since Apache `v2.3.9` via [AllowOverride Directive](https://httpd.apache.org/docs/current/mod/core.html#allowoverride).
|
The provided [.htaccess](server/php/files/.htaccess) file includes instructions
|
||||||
|
for Apache to disable script execution, however
|
||||||
|
[.htaccess support](https://httpd.apache.org/docs/current/howto/htaccess.html)
|
||||||
|
is disabled by default since Apache `v2.3.9` via
|
||||||
|
[AllowOverride Directive](https://httpd.apache.org/docs/current/mod/core.html#allowoverride).
|
||||||
|
|
||||||
**You are affected if you:**
|
**You are affected if you:**
|
||||||
1. A) Uploaded jQuery File Upload < `v9.24.1` on a Webserver that executes files with `.php` as part of the file extension (e.g. "example.php.png"), e.g. Apache with `mod_php` enabled and the following directive (*not a recommended configuration*):
|
|
||||||
```ApacheConf
|
1. A) Uploaded jQuery File Upload < `v9.24.1` on a Webserver that executes files
|
||||||
AddHandler php5-script .php
|
with `.php` as part of the file extension (e.g. "example.php.png"), e.g.
|
||||||
```
|
Apache with `mod_php` enabled and the following directive (_not a recommended
|
||||||
B) Uploaded jQuery File Upload < `v9.22.1` on a Webserver that executes files with the file extension `.php`, e.g. Apache with `mod_php` enabled and the following directive:
|
configuration_):
|
||||||
```ApacheConf
|
```ApacheConf
|
||||||
<FilesMatch \.php$>
|
AddHandler php5-script .php
|
||||||
SetHandler application/x-httpd-php
|
```
|
||||||
</FilesMatch>
|
B) Uploaded jQuery File Upload < `v9.22.1` on a Webserver that executes files
|
||||||
```
|
with the file extension `.php`, e.g. Apache with `mod_php` enabled and the
|
||||||
2. Did not actively configure your Webserver to not execute files in the upload directory (`server/php/files`).
|
following directive:
|
||||||
3. Are running Apache `v2.3.9+` with the default `AllowOverride` Directive set to `None` or another Webserver with no `.htaccess` support.
|
```ApacheConf
|
||||||
|
<FilesMatch \.php$>
|
||||||
|
SetHandler application/x-httpd-php
|
||||||
|
</FilesMatch>
|
||||||
|
```
|
||||||
|
2. Did not actively configure your Webserver to not execute files in the upload
|
||||||
|
directory (`server/php/files`).
|
||||||
|
3. Are running Apache `v2.3.9+` with the default `AllowOverride` Directive set
|
||||||
|
to `None` or another Webserver with no `.htaccess` support.
|
||||||
|
|
||||||
**How to fix it:**
|
**How to fix it:**
|
||||||
|
|
||||||
1. Upgrade to the latest version of jQuery File Upload.
|
1. Upgrade to the latest version of jQuery File Upload.
|
||||||
2. Configure your Webserver to not execute files in the upload directory, e.g. with the [sample Apache configuration](SECURITY.md#apache-config)
|
2. Configure your Webserver to not execute files in the upload directory, e.g.
|
||||||
|
with the [sample Apache configuration](SECURITY.md#apache-config)
|
||||||
|
|
||||||
**Further information:**
|
**Further information:**
|
||||||
* Commits containing the security fix: [aeb47e5](https://github.com/blueimp/jQuery-File-Upload/commit/aeb47e51c67df8a504b7726595576c1c66b5dc2f), [ad4aefd](https://github.com/blueimp/jQuery-File-Upload/commit/ad4aefd96e4056deab6fea2690f0d8cf56bb2d7d)
|
|
||||||
* [Full disclosure post on Hacker News](https://news.ycombinator.com/item?id=18267309).
|
- Commits containing the security fix:
|
||||||
* [CVE-2018-9206](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9206)
|
[aeb47e5](https://github.com/blueimp/jQuery-File-Upload/commit/aeb47e51c67df8a504b7726595576c1c66b5dc2f),
|
||||||
* [OWASP - Unrestricted File Upload](https://www.owasp.org/index.php/Unrestricted_File_Upload)
|
[ad4aefd](https://github.com/blueimp/jQuery-File-Upload/commit/ad4aefd96e4056deab6fea2690f0d8cf56bb2d7d)
|
||||||
|
- [Full disclosure post on Hacker News](https://news.ycombinator.com/item?id=18267309).
|
||||||
|
- [CVE-2018-9206](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9206)
|
||||||
|
- [OWASP - Unrestricted File Upload](https://owasp.org/www-community/vulnerabilities/Unrestricted_File_Upload)
|
||||||
|
|
||||||
## Open redirect vulnerability in the GAE components
|
## Open redirect vulnerability in the GAE components
|
||||||
|
|
||||||
> Fixed: 2015-06-12 (GMT)
|
> Fixed: 2015-06-12 (GMT)
|
||||||
|
|
||||||
The sample Google App Engine upload handlers before v[9.10.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/9.10.1) accepted any URL as redirect target, making it possible to use the Webserver's domain for phishing attacks.
|
The sample Google App Engine upload handlers before
|
||||||
|
v[9.10.1](https://github.com/blueimp/jQuery-File-Upload/releases/tag/9.10.1)
|
||||||
|
accepted any URL as redirect target, making it possible to use the Webserver's
|
||||||
|
domain for phishing attacks.
|
||||||
|
|
||||||
**Further information:**
|
**Further information:**
|
||||||
* Commit containing the security fix: [f74d2a8](https://github.com/blueimp/jQuery-File-Upload/commit/f74d2a8c3e3b1e8e336678d2899facd5bcdb589f)
|
|
||||||
* [OWASP - Unvalidated Redirects and Forwards Cheat Sheet](https://www.owasp.org/index.php/Unvalidated_Redirects_and_Forwards_Cheat_Sheet)
|
- Commit containing the security fix:
|
||||||
|
[f74d2a8](https://github.com/blueimp/jQuery-File-Upload/commit/f74d2a8c3e3b1e8e336678d2899facd5bcdb589f)
|
||||||
|
- [OWASP - Unvalidated Redirects and Forwards Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)
|
||||||
|
|
||||||
## Cross-site scripting vulnerability in the Iframe Transport
|
## Cross-site scripting vulnerability in the Iframe Transport
|
||||||
|
|
||||||
> Fixed: 2012-08-09 (GMT)
|
> Fixed: 2012-08-09 (GMT)
|
||||||
|
|
||||||
The [redirect page](cors/result.html) for the [Iframe Transport](js/jquery.iframe-transport.js) before commit [4175032](https://github.com/blueimp/jQuery-File-Upload/commit/41750323a464e848856dc4c5c940663498beb74a) (*fixed in all tagged releases*) allowed executing arbitrary JavaScript in the context of the Webserver.
|
The [redirect page](cors/result.html) for the
|
||||||
|
[Iframe Transport](js/jquery.iframe-transport.js) before commit
|
||||||
|
[4175032](https://github.com/blueimp/jQuery-File-Upload/commit/41750323a464e848856dc4c5c940663498beb74a)
|
||||||
|
(_fixed in all tagged releases_) allowed executing arbitrary JavaScript in the
|
||||||
|
context of the Webserver.
|
||||||
|
|
||||||
**Further information:**
|
**Further information:**
|
||||||
* Commit containing the security fix: [4175032](https://github.com/blueimp/jQuery-File-Upload/commit/41750323a464e848856dc4c5c940663498beb74a)
|
|
||||||
* [OWASP - Cross-site Scripting (XSS)](https://www.owasp.org/index.php/Cross-site_Scripting_(XSS))
|
- Commit containing the security fix:
|
||||||
|
[4175032](https://github.com/blueimp/jQuery-File-Upload/commit/41750323a464e848856dc4c5c940663498beb74a)
|
||||||
|
- [OWASP - Cross-site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/)
|
||||||
|
|
211
vendor/blueimp/jquery-file-upload/angularjs.html
vendored
211
vendor/blueimp/jquery-file-upload/angularjs.html
vendored
|
@ -1,211 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin AngularJS Demo
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
|
||||||
<!--[if IE]>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<![endif]-->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>jQuery File Upload Demo - AngularJS version</title>
|
|
||||||
<meta name="description" content="File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for AngularJS. 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.">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<!-- Bootstrap styles -->
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
||||||
<!-- Generic page styles -->
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<!-- blueimp Gallery styles -->
|
|
||||||
<link rel="stylesheet" href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
|
|
||||||
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload.css">
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload-ui.css">
|
|
||||||
<!-- CSS adjustments for browsers with JavaScript disabled -->
|
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"></noscript>
|
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript>
|
|
||||||
<style>
|
|
||||||
/* Hide Angular JS elements before initializing */
|
|
||||||
.ng-cloak {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse">
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
|
|
||||||
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<h1>jQuery File Upload Demo</h1>
|
|
||||||
<h2 class="lead">AngularJS version</h2>
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li><a href="basic.html">Basic</a></li>
|
|
||||||
<li><a href="basic-plus.html">Basic Plus</a></li>
|
|
||||||
<li><a href="index.html">Basic Plus UI</a></li>
|
|
||||||
<li class="active"><a href="angularjs.html">AngularJS</a></li>
|
|
||||||
<li><a href="jquery-ui.html">jQuery UI</a></li>
|
|
||||||
</ul>
|
|
||||||
<br>
|
|
||||||
<blockquote>
|
|
||||||
<p>File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for AngularJS.<br>
|
|
||||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
|
|
||||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
|
|
||||||
</blockquote>
|
|
||||||
<br>
|
|
||||||
<!-- The file upload form used as target for the file upload widget -->
|
|
||||||
<form id="fileupload" action="https://jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data" data-ng-app="demo" data-ng-controller="DemoFileUploadController" data-file-upload="options" data-ng-class="{'fileupload-processing': processing() || loadingFiles}">
|
|
||||||
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
|
||||||
<noscript><input type="hidden" name="redirect" value="https://blueimp.github.io/jQuery-File-Upload/"></noscript>
|
|
||||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
|
||||||
<div class="row fileupload-buttonbar">
|
|
||||||
<div class="col-lg-7">
|
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
||||||
<span class="btn btn-success fileinput-button" ng-class="{disabled: disabled}">
|
|
||||||
<i class="glyphicon glyphicon-plus"></i>
|
|
||||||
<span>Add files...</span>
|
|
||||||
<input type="file" name="files[]" multiple ng-disabled="disabled">
|
|
||||||
</span>
|
|
||||||
<button type="button" class="btn btn-primary start" data-ng-click="submit()">
|
|
||||||
<i class="glyphicon glyphicon-upload"></i>
|
|
||||||
<span>Start upload</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-warning cancel" data-ng-click="cancel()">
|
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
|
||||||
<span>Cancel upload</span>
|
|
||||||
</button>
|
|
||||||
<!-- The global file processing state -->
|
|
||||||
<span class="fileupload-process"></span>
|
|
||||||
</div>
|
|
||||||
<!-- The global progress state -->
|
|
||||||
<div class="col-lg-5 fade" data-ng-class="{in: active()}">
|
|
||||||
<!-- The global progress bar -->
|
|
||||||
<div class="progress progress-striped active" data-file-upload-progress="progress()"><div class="progress-bar progress-bar-success" data-ng-style="{width: num + '%'}"></div></div>
|
|
||||||
<!-- The extended global progress state -->
|
|
||||||
<div class="progress-extended"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- The table listing the files available for upload/download -->
|
|
||||||
<table class="table table-striped files ng-cloak">
|
|
||||||
<tr data-ng-repeat="file in queue" data-ng-class="{'processing': file.$processing()}">
|
|
||||||
<td data-ng-switch data-on="!!file.thumbnailUrl">
|
|
||||||
<div class="preview" data-ng-switch-when="true">
|
|
||||||
<a data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}" data-gallery><img data-ng-src="{{file.thumbnailUrl}}" alt=""></a>
|
|
||||||
</div>
|
|
||||||
<div class="preview" data-ng-switch-default data-file-upload-preview="file"></div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="name" data-ng-switch data-on="!!file.url">
|
|
||||||
<span data-ng-switch-when="true" data-ng-switch data-on="!!file.thumbnailUrl">
|
|
||||||
<a data-ng-switch-when="true" data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}" data-gallery>{{file.name}}</a>
|
|
||||||
<a data-ng-switch-default data-ng-href="{{file.url}}" title="{{file.name}}" download="{{file.name}}">{{file.name}}</a>
|
|
||||||
</span>
|
|
||||||
<span data-ng-switch-default>{{file.name}}</span>
|
|
||||||
</p>
|
|
||||||
<strong data-ng-show="file.error" class="error text-danger">{{file.error}}</strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="size">{{file.size | formatFileSize}}</p>
|
|
||||||
<div class="progress progress-striped active fade" data-ng-class="{pending: 'in'}[file.$state()]" data-file-upload-progress="file.$progress()"><div class="progress-bar progress-bar-success" data-ng-style="{width: num + '%'}"></div></div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button type="button" class="btn btn-primary start" data-ng-click="file.$submit()" data-ng-hide="!file.$submit || options.autoUpload" data-ng-disabled="file.$state() == 'pending' || file.$state() == 'rejected'">
|
|
||||||
<i class="glyphicon glyphicon-upload"></i>
|
|
||||||
<span>Start</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-warning cancel" data-ng-click="file.$cancel()" data-ng-hide="!file.$cancel">
|
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
|
||||||
<span>Cancel</span>
|
|
||||||
</button>
|
|
||||||
<button data-ng-controller="FileDestroyController" type="button" class="btn btn-danger destroy" data-ng-click="file.$destroy()" data-ng-hide="!file.$destroy">
|
|
||||||
<i class="glyphicon glyphicon-trash"></i>
|
|
||||||
<span>Delete</span>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
<br>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title">Demo Notes</h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<ul>
|
|
||||||
<li>The maximum file size for uploads in this demo is <strong>999 KB</strong> (default file size is unlimited).</li>
|
|
||||||
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
|
|
||||||
<li>Uploaded files will be deleted automatically after <strong>5 minutes or less</strong> (demo files are stored in memory).</li>
|
|
||||||
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
|
|
||||||
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
|
|
||||||
<li>Built with the <a href="http://getbootstrap.com/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- The blueimp Gallery widget -->
|
|
||||||
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
|
|
||||||
<div class="slides"></div>
|
|
||||||
<h3 class="title"></h3>
|
|
||||||
<a class="prev">‹</a>
|
|
||||||
<a class="next">›</a>
|
|
||||||
<a class="close">×</a>
|
|
||||||
<a class="play-pause"></a>
|
|
||||||
<ol class="indicator"></ol>
|
|
||||||
</div>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js" integrity="sha384-r6jjWwxAypHaESwS5an5J9dkfzwQuKVNV9FZM9B6fnt8PFuY0cVwLhV7BltCZhLy" crossorigin="anonymous"></script>
|
|
||||||
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
|
||||||
<script src="js/vendor/jquery.ui.widget.js"></script>
|
|
||||||
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
|
||||||
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
|
||||||
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
||||||
<!-- blueimp Gallery script -->
|
|
||||||
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
|
|
||||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
|
||||||
<script src="js/jquery.iframe-transport.js"></script>
|
|
||||||
<!-- The basic File Upload plugin -->
|
|
||||||
<script src="js/jquery.fileupload.js"></script>
|
|
||||||
<!-- The File Upload processing plugin -->
|
|
||||||
<script src="js/jquery.fileupload-process.js"></script>
|
|
||||||
<!-- The File Upload image preview & resize plugin -->
|
|
||||||
<script src="js/jquery.fileupload-image.js"></script>
|
|
||||||
<!-- The File Upload audio preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-audio.js"></script>
|
|
||||||
<!-- The File Upload video preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-video.js"></script>
|
|
||||||
<!-- The File Upload validation plugin -->
|
|
||||||
<script src="js/jquery.fileupload-validate.js"></script>
|
|
||||||
<!-- The File Upload Angular JS module -->
|
|
||||||
<script src="js/jquery.fileupload-angular.js"></script>
|
|
||||||
<!-- The main application script -->
|
|
||||||
<script src="js/app.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
226
vendor/blueimp/jquery-file-upload/basic-plus.html
vendored
226
vendor/blueimp/jquery-file-upload/basic-plus.html
vendored
|
@ -1,226 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin Basic Plus Demo
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
|
||||||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>jQuery File Upload Demo - Basic Plus version</title>
|
|
||||||
<meta name="description" content="File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<!-- Bootstrap styles -->
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
||||||
<!-- Generic page styles -->
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse">
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
|
|
||||||
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<h1>jQuery File Upload Demo</h1>
|
|
||||||
<h2 class="lead">Basic Plus version</h2>
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li><a href="basic.html">Basic</a></li>
|
|
||||||
<li class="active"><a href="basic-plus.html">Basic Plus</a></li>
|
|
||||||
<li><a href="index.html">Basic Plus UI</a></li>
|
|
||||||
<li><a href="angularjs.html">AngularJS</a></li>
|
|
||||||
<li><a href="jquery-ui.html">jQuery UI</a></li>
|
|
||||||
</ul>
|
|
||||||
<br>
|
|
||||||
<blockquote>
|
|
||||||
<p>File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery.<br>
|
|
||||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
|
|
||||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
|
|
||||||
</blockquote>
|
|
||||||
<br>
|
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
||||||
<span class="btn btn-success fileinput-button">
|
|
||||||
<i class="glyphicon glyphicon-plus"></i>
|
|
||||||
<span>Add files...</span>
|
|
||||||
<!-- The file input field used as target for the file upload widget -->
|
|
||||||
<input id="fileupload" type="file" name="files[]" multiple>
|
|
||||||
</span>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<!-- The global progress bar -->
|
|
||||||
<div id="progress" class="progress">
|
|
||||||
<div class="progress-bar progress-bar-success"></div>
|
|
||||||
</div>
|
|
||||||
<!-- The container for the uploaded files -->
|
|
||||||
<div id="files" class="files"></div>
|
|
||||||
<br>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title">Demo Notes</h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<ul>
|
|
||||||
<li>The maximum file size for uploads in this demo is <strong>999 KB</strong> (default file size is unlimited).</li>
|
|
||||||
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
|
|
||||||
<li>Uploaded files will be deleted automatically after <strong>5 minutes or less</strong> (demo files are stored in memory).</li>
|
|
||||||
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
|
|
||||||
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
|
|
||||||
<li>Built with the <a href="http://getbootstrap.com/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
|
||||||
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
|
||||||
<script src="js/vendor/jquery.ui.widget.js"></script>
|
|
||||||
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
|
||||||
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
|
||||||
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
||||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
|
||||||
<script src="js/jquery.iframe-transport.js"></script>
|
|
||||||
<!-- The basic File Upload plugin -->
|
|
||||||
<script src="js/jquery.fileupload.js"></script>
|
|
||||||
<!-- The File Upload processing plugin -->
|
|
||||||
<script src="js/jquery.fileupload-process.js"></script>
|
|
||||||
<!-- The File Upload image preview & resize plugin -->
|
|
||||||
<script src="js/jquery.fileupload-image.js"></script>
|
|
||||||
<!-- The File Upload audio preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-audio.js"></script>
|
|
||||||
<!-- The File Upload video preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-video.js"></script>
|
|
||||||
<!-- The File Upload validation plugin -->
|
|
||||||
<script src="js/jquery.fileupload-validate.js"></script>
|
|
||||||
<script>
|
|
||||||
/*jslint unparam: true, regexp: true */
|
|
||||||
/*global window, $ */
|
|
||||||
$(function () {
|
|
||||||
'use strict';
|
|
||||||
// Change this to the location of your server-side upload handler:
|
|
||||||
var url = window.location.hostname === 'blueimp.github.io' ?
|
|
||||||
'//jquery-file-upload.appspot.com/' : 'server/php/',
|
|
||||||
uploadButton = $('<button/>')
|
|
||||||
.addClass('btn btn-primary')
|
|
||||||
.prop('disabled', true)
|
|
||||||
.text('Processing...')
|
|
||||||
.on('click', function () {
|
|
||||||
var $this = $(this),
|
|
||||||
data = $this.data();
|
|
||||||
$this
|
|
||||||
.off('click')
|
|
||||||
.text('Abort')
|
|
||||||
.on('click', function () {
|
|
||||||
$this.remove();
|
|
||||||
data.abort();
|
|
||||||
});
|
|
||||||
data.submit().always(function () {
|
|
||||||
$this.remove();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$('#fileupload').fileupload({
|
|
||||||
url: url,
|
|
||||||
dataType: 'json',
|
|
||||||
autoUpload: false,
|
|
||||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
|
|
||||||
maxFileSize: 999000,
|
|
||||||
// Enable image resizing, except for Android and Opera,
|
|
||||||
// which actually support image resizing, but fail to
|
|
||||||
// send Blob objects via XHR requests:
|
|
||||||
disableImageResize: /Android(?!.*Chrome)|Opera/
|
|
||||||
.test(window.navigator.userAgent),
|
|
||||||
previewMaxWidth: 100,
|
|
||||||
previewMaxHeight: 100,
|
|
||||||
previewCrop: true
|
|
||||||
}).on('fileuploadadd', function (e, data) {
|
|
||||||
data.context = $('<div/>').appendTo('#files');
|
|
||||||
$.each(data.files, function (index, file) {
|
|
||||||
$('<p/>')
|
|
||||||
.append($('<span/>').text(file.name))
|
|
||||||
.appendTo(data.context);
|
|
||||||
if (index === data.files.length - 1) {
|
|
||||||
$('<p/>')
|
|
||||||
.append(uploadButton.clone(true).data(data))
|
|
||||||
.appendTo(data.context);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).on('fileuploadprocessalways', function (e, data) {
|
|
||||||
var index = data.index,
|
|
||||||
file = data.files[index],
|
|
||||||
node = $(data.context.children()[index]);
|
|
||||||
if (file.preview) {
|
|
||||||
node
|
|
||||||
.prepend('<br>')
|
|
||||||
.prepend(file.preview);
|
|
||||||
}
|
|
||||||
if (file.error) {
|
|
||||||
node
|
|
||||||
.append('<br>')
|
|
||||||
.append($('<span class="text-danger"/>').text(file.error));
|
|
||||||
}
|
|
||||||
if (index + 1 === data.files.length) {
|
|
||||||
data.context.find('button')
|
|
||||||
.text('Upload')
|
|
||||||
.prop('disabled', !!data.files.error);
|
|
||||||
}
|
|
||||||
}).on('fileuploadprogressall', function (e, data) {
|
|
||||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
|
||||||
$('#progress .progress-bar').css(
|
|
||||||
'width',
|
|
||||||
progress + '%'
|
|
||||||
);
|
|
||||||
}).on('fileuploaddone', function (e, data) {
|
|
||||||
$.each(data.result.files, function (index, file) {
|
|
||||||
if (file.url) {
|
|
||||||
var link = $('<a>')
|
|
||||||
.attr('target', '_blank')
|
|
||||||
.prop('href', file.url);
|
|
||||||
$(data.context.children()[index])
|
|
||||||
.wrap(link);
|
|
||||||
} else if (file.error) {
|
|
||||||
var error = $('<span class="text-danger"/>').text(file.error);
|
|
||||||
$(data.context.children()[index])
|
|
||||||
.append('<br>')
|
|
||||||
.append(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).on('fileuploadfail', function (e, data) {
|
|
||||||
$.each(data.files, function (index) {
|
|
||||||
var error = $('<span class="text-danger"/>').text('File upload failed.');
|
|
||||||
$(data.context.children()[index])
|
|
||||||
.append('<br>')
|
|
||||||
.append(error);
|
|
||||||
});
|
|
||||||
}).prop('disabled', !$.support.fileInput)
|
|
||||||
.parent().addClass($.support.fileInput ? undefined : 'disabled');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
136
vendor/blueimp/jquery-file-upload/basic.html
vendored
136
vendor/blueimp/jquery-file-upload/basic.html
vendored
|
@ -1,136 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin Basic Demo
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
|
||||||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>jQuery File Upload Demo - Basic version</title>
|
|
||||||
<meta name="description" content="File Upload widget with multiple file selection, drag&drop support and progress bar for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<!-- Bootstrap styles -->
|
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
|
||||||
<!-- Generic page styles -->
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="navbar navbar-default navbar-fixed-top">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse">
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
|
|
||||||
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<h1>jQuery File Upload Demo</h1>
|
|
||||||
<h2 class="lead">Basic version</h2>
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li class="active"><a href="basic.html">Basic</a></li>
|
|
||||||
<li><a href="basic-plus.html">Basic Plus</a></li>
|
|
||||||
<li><a href="index.html">Basic Plus UI</a></li>
|
|
||||||
<li><a href="angularjs.html">AngularJS</a></li>
|
|
||||||
<li><a href="jquery-ui.html">jQuery UI</a></li>
|
|
||||||
</ul>
|
|
||||||
<br>
|
|
||||||
<blockquote>
|
|
||||||
<p>File Upload widget with multiple file selection, drag&drop support and progress bar for jQuery.<br>
|
|
||||||
Supports cross-domain, chunked and resumable file uploads.<br>
|
|
||||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
|
|
||||||
</blockquote>
|
|
||||||
<br>
|
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
||||||
<span class="btn btn-success fileinput-button">
|
|
||||||
<i class="glyphicon glyphicon-plus"></i>
|
|
||||||
<span>Select files...</span>
|
|
||||||
<!-- The file input field used as target for the file upload widget -->
|
|
||||||
<input id="fileupload" type="file" name="files[]" multiple>
|
|
||||||
</span>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<!-- The global progress bar -->
|
|
||||||
<div id="progress" class="progress">
|
|
||||||
<div class="progress-bar progress-bar-success"></div>
|
|
||||||
</div>
|
|
||||||
<!-- The container for the uploaded files -->
|
|
||||||
<div id="files" class="files"></div>
|
|
||||||
<br>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title">Demo Notes</h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<ul>
|
|
||||||
<li>The maximum file size for uploads in this demo is <strong>999 KB</strong> (default file size is unlimited).</li>
|
|
||||||
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
|
|
||||||
<li>Uploaded files will be deleted automatically after <strong>5 minutes or less</strong> (demo files are stored in memory).</li>
|
|
||||||
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
|
|
||||||
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
|
|
||||||
<li>Built with the <a href="http://getbootstrap.com/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
|
||||||
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
|
||||||
<script src="js/vendor/jquery.ui.widget.js"></script>
|
|
||||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
|
||||||
<script src="js/jquery.iframe-transport.js"></script>
|
|
||||||
<!-- The basic File Upload plugin -->
|
|
||||||
<script src="js/jquery.fileupload.js"></script>
|
|
||||||
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
|
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
|
||||||
<script>
|
|
||||||
/*jslint unparam: true */
|
|
||||||
/*global window, $ */
|
|
||||||
$(function () {
|
|
||||||
'use strict';
|
|
||||||
// Change this to the location of your server-side upload handler:
|
|
||||||
var url = window.location.hostname === 'blueimp.github.io' ?
|
|
||||||
'//jquery-file-upload.appspot.com/' : 'server/php/';
|
|
||||||
$('#fileupload').fileupload({
|
|
||||||
url: url,
|
|
||||||
dataType: 'json',
|
|
||||||
done: function (e, data) {
|
|
||||||
$.each(data.result.files, function (index, file) {
|
|
||||||
$('<p/>').text(file.name).appendTo('#files');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
progressall: function (e, data) {
|
|
||||||
var progress = parseInt(data.loaded / data.total * 100, 10);
|
|
||||||
$('#progress .progress-bar').css(
|
|
||||||
'width',
|
|
||||||
progress + '%'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}).prop('disabled', !$.support.fileInput)
|
|
||||||
.parent().addClass($.support.fileInput ? undefined : 'disabled');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var path = require('path');
|
|
||||||
var packageJSON = require(path.join(__dirname, 'package.json'));
|
|
||||||
var bowerFile = path.join(__dirname, 'bower.json');
|
|
||||||
var bowerJSON = require('bower-json').parse(
|
|
||||||
require(bowerFile),
|
|
||||||
{normalize: true}
|
|
||||||
);
|
|
||||||
bowerJSON.version = packageJSON.version;
|
|
||||||
require('fs').writeFileSync(
|
|
||||||
bowerFile,
|
|
||||||
JSON.stringify(bowerJSON, null, 2) + '\n'
|
|
||||||
);
|
|
64
vendor/blueimp/jquery-file-upload/bower.json
vendored
64
vendor/blueimp/jquery-file-upload/bower.json
vendored
|
@ -1,64 +0,0 @@
|
||||||
{
|
|
||||||
"name": "blueimp-file-upload",
|
|
||||||
"version": "9.34.0",
|
|
||||||
"title": "jQuery File Upload",
|
|
||||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
|
|
||||||
"keywords": [
|
|
||||||
"jquery",
|
|
||||||
"file",
|
|
||||||
"upload",
|
|
||||||
"widget",
|
|
||||||
"multiple",
|
|
||||||
"selection",
|
|
||||||
"drag",
|
|
||||||
"drop",
|
|
||||||
"progress",
|
|
||||||
"preview",
|
|
||||||
"cross-domain",
|
|
||||||
"cross-site",
|
|
||||||
"chunk",
|
|
||||||
"resume",
|
|
||||||
"gae",
|
|
||||||
"go",
|
|
||||||
"python",
|
|
||||||
"php",
|
|
||||||
"bootstrap"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/blueimp/jQuery-File-Upload",
|
|
||||||
"author": {
|
|
||||||
"name": "Sebastian Tschan",
|
|
||||||
"url": "https://blueimp.net"
|
|
||||||
},
|
|
||||||
"maintainers": [
|
|
||||||
{
|
|
||||||
"name": "Sebastian Tschan",
|
|
||||||
"url": "https://blueimp.net"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/blueimp/jQuery-File-Upload.git"
|
|
||||||
},
|
|
||||||
"bugs": "https://github.com/blueimp/jQuery-File-Upload/issues",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": ">=1.6",
|
|
||||||
"blueimp-tmpl": ">=2.5.4",
|
|
||||||
"blueimp-load-image": ">=1.13.0",
|
|
||||||
"blueimp-canvas-to-blob": ">=2.1.1"
|
|
||||||
},
|
|
||||||
"main": [
|
|
||||||
"js/jquery.fileupload.js"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"/*.*",
|
|
||||||
"/cors",
|
|
||||||
"css/jquery-ui-demo-ie8.css",
|
|
||||||
"css/jquery-ui-demo.css",
|
|
||||||
"css/style.css",
|
|
||||||
"js/app.js",
|
|
||||||
"js/main.js",
|
|
||||||
"server",
|
|
||||||
"test"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -28,7 +28,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
, "support": {
|
, "support": {
|
||||||
"forum": "https://groups.google.com/forum/#!forum/jquery-fileupload"
|
"forum": "https://stackoverflow.com/questions/tagged/blueimp+jquery+file-upload"
|
||||||
}
|
}
|
||||||
, "license": "MIT"
|
, "license": "MIT"
|
||||||
, "autoload": {
|
, "autoload": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* jQuery File Upload Plugin postMessage API
|
* jQuery File Upload Plugin postMessage API
|
||||||
|
@ -12,64 +12,74 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>jQuery File Upload Plugin postMessage API</title>
|
<title>jQuery File Upload Plugin postMessage API</title>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
<script
|
||||||
</head>
|
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
|
||||||
<body>
|
integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
|
||||||
<script>
|
crossorigin="anonymous"
|
||||||
/*jslint unparam: true, regexp: true */
|
></script>
|
||||||
/*global $, Blob, FormData, location */
|
</head>
|
||||||
'use strict';
|
<body>
|
||||||
var origin = /^http:\/\/example.org/,
|
<script>
|
||||||
target = new RegExp('^(http(s)?:)?\\/\\/' + location.host + '\\/');
|
'use strict';
|
||||||
$(window).on('message', function (e) {
|
var origin = /^https:\/\/example.org/,
|
||||||
e = e.originalEvent;
|
target = new RegExp('^(http(s)?:)?\\/\\/' + location.host + '\\/');
|
||||||
var s = e.data,
|
$(window).on('message', function (e) {
|
||||||
xhr = $.ajaxSettings.xhr(),
|
e = e.originalEvent;
|
||||||
f;
|
var s = e.data,
|
||||||
if (!origin.test(e.origin)) {
|
xhr = $.ajaxSettings.xhr(),
|
||||||
throw new Error('Origin "' + e.origin + '" does not match ' + origin);
|
f;
|
||||||
}
|
if (!origin.test(e.origin)) {
|
||||||
if (!target.test(e.data.url)) {
|
throw new Error('Origin "' + e.origin + '" does not match ' + origin);
|
||||||
throw new Error('Target "' + e.data.url + '" does not match ' + target);
|
}
|
||||||
}
|
if (!target.test(e.data.url)) {
|
||||||
$(xhr.upload).on('progress', function (ev) {
|
throw new Error(
|
||||||
ev = ev.originalEvent;
|
'Target "' + e.data.url + '" does not match ' + target
|
||||||
e.source.postMessage({
|
);
|
||||||
id: s.id,
|
}
|
||||||
type: ev.type,
|
$(xhr.upload).on('progress', function (ev) {
|
||||||
timeStamp: ev.timeStamp,
|
ev = ev.originalEvent;
|
||||||
lengthComputable: ev.lengthComputable,
|
e.source.postMessage(
|
||||||
loaded: ev.loaded,
|
{
|
||||||
total: ev.total
|
id: s.id,
|
||||||
}, e.origin);
|
type: ev.type,
|
||||||
});
|
timeStamp: ev.timeStamp,
|
||||||
s.xhr = function () {
|
lengthComputable: ev.lengthComputable,
|
||||||
return xhr;
|
loaded: ev.loaded,
|
||||||
};
|
total: ev.total
|
||||||
if (!(s.data instanceof Blob)) {
|
},
|
||||||
f = new FormData();
|
e.origin
|
||||||
$.each(s.data, function (i, v) {
|
);
|
||||||
f.append(v.name, v.value);
|
|
||||||
});
|
});
|
||||||
s.data = f;
|
s.xhr = function () {
|
||||||
}
|
return xhr;
|
||||||
$.ajax(s).always(function (result, statusText, jqXHR) {
|
};
|
||||||
if (!jqXHR.done) {
|
if (!(s.data instanceof Blob)) {
|
||||||
|
f = new FormData();
|
||||||
|
$.each(s.data, function (i, v) {
|
||||||
|
f.append(v.name, v.value);
|
||||||
|
});
|
||||||
|
s.data = f;
|
||||||
|
}
|
||||||
|
$.ajax(s).always(function (result, statusText, jqXHR) {
|
||||||
|
if (!jqXHR.done) {
|
||||||
jqXHR = result;
|
jqXHR = result;
|
||||||
result = null;
|
result = null;
|
||||||
}
|
}
|
||||||
e.source.postMessage({
|
e.source.postMessage(
|
||||||
id: s.id,
|
{
|
||||||
status: jqXHR.status,
|
id: s.id,
|
||||||
statusText: statusText,
|
status: jqXHR.status,
|
||||||
result: result,
|
statusText: statusText,
|
||||||
headers: jqXHR.getAllResponseHeaders()
|
result: result,
|
||||||
}, e.origin);
|
headers: jqXHR.getAllResponseHeaders()
|
||||||
});
|
},
|
||||||
});
|
e.origin
|
||||||
</script>
|
);
|
||||||
</body>
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* jQuery Iframe Transport Plugin Redirect Page
|
* jQuery Iframe Transport Plugin Redirect Page
|
||||||
|
@ -12,13 +12,15 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>jQuery Iframe Transport Plugin Redirect Page</title>
|
<title>jQuery Iframe Transport Plugin Redirect Page</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
document.body.innerText=document.body.textContent=decodeURIComponent(window.location.search.slice(1));
|
document.body.innerText = document.body.textContent = decodeURIComponent(
|
||||||
</script>
|
window.location.search.slice(1)
|
||||||
</body>
|
);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
@charset "UTF-8";
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Demo CSS Fixes for IE<9
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
.navigation {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0;
|
|
||||||
}
|
|
||||||
.navigation li {
|
|
||||||
display: inline;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
@charset "UTF-8";
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Demo CSS
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
body {
|
|
||||||
max-width: 750px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 1em;
|
|
||||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
line-height: 1.4em;
|
|
||||||
background: #222;
|
|
||||||
color: #fff;
|
|
||||||
-webkit-text-size-adjust: 100%;
|
|
||||||
-ms-text-size-adjust: 100%;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: orange;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
border: 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
blockquote {
|
|
||||||
padding: 0 0 0 15px;
|
|
||||||
margin: 0 0 20px;
|
|
||||||
border-left: 5px solid #eee;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fileupload-progress {
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
.fileupload-progress .progress-extended {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
.error {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 481px) {
|
|
||||||
.navigation {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
.navigation li {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.navigation li:not(:first-child):before {
|
|
||||||
content: "| ";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -10,13 +10,9 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.fileupload-buttonbar .btn,
|
|
||||||
.fileupload-buttonbar .toggle {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.progress-animated .progress-bar,
|
.progress-animated .progress-bar,
|
||||||
.progress-animated .bar {
|
.progress-animated .bar {
|
||||||
background: url("../img/progressbar.gif") !important;
|
background: url('../img/progressbar.gif') !important;
|
||||||
filter: none;
|
filter: none;
|
||||||
}
|
}
|
||||||
.fileupload-process {
|
.fileupload-process {
|
||||||
|
@ -28,30 +24,45 @@
|
||||||
display: block;
|
display: block;
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
background: url("../img/loading.gif") center no-repeat;
|
background: url('../img/loading.gif') center no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
.files audio,
|
.files audio,
|
||||||
.files video {
|
.files video {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
|
.files .name {
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
-webkit-hyphens: auto;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
.files button {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.toggle[type='checkbox'] {
|
||||||
|
transform: scale(2);
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
|
.fileupload-buttonbar .btn {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.fileupload-buttonbar .delete,
|
||||||
.fileupload-buttonbar .toggle,
|
.fileupload-buttonbar .toggle,
|
||||||
.files .toggle,
|
.files .toggle,
|
||||||
.files .btn span {
|
.files .btn span {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.files .name {
|
|
||||||
width: 80px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
.files audio,
|
.files audio,
|
||||||
.files video {
|
.files video {
|
||||||
max-width: 80px;
|
max-width: 80px;
|
||||||
}
|
}
|
||||||
.files img,
|
}
|
||||||
.files canvas {
|
|
||||||
max-width: 100%;
|
@media (max-width: 480px) {
|
||||||
|
.files .image td:nth-child(2) {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,9 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
height: 100%;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-ms-filter: 'alpha(opacity=0)';
|
filter: alpha(opacity=0);
|
||||||
font-size: 200px !important;
|
font-size: 200px !important;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -30,8 +31,6 @@
|
||||||
/* Fixes for IE < 8 */
|
/* Fixes for IE < 8 */
|
||||||
@media screen\9 {
|
@media screen\9 {
|
||||||
.fileinput-button input {
|
.fileinput-button input {
|
||||||
filter: alpha(opacity=0);
|
font-size: 150% !important;
|
||||||
font-size: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
15
vendor/blueimp/jquery-file-upload/css/style.css
vendored
15
vendor/blueimp/jquery-file-upload/css/style.css
vendored
|
@ -1,15 +0,0 @@
|
||||||
@charset "UTF-8";
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin CSS Example
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
body {
|
|
||||||
padding-top: 60px;
|
|
||||||
}
|
|
59
vendor/blueimp/jquery-file-upload/docker-compose.yml
vendored
Normal file
59
vendor/blueimp/jquery-file-upload/docker-compose.yml
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
example:
|
||||||
|
build: server/php
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:80:80
|
||||||
|
- ${SERVER_HOST:-127.0.0.1}:${SERVER_PORT-}:80
|
||||||
|
volumes:
|
||||||
|
- .:/var/www/html
|
||||||
|
mocha:
|
||||||
|
image: blueimp/mocha-chrome
|
||||||
|
command: http://example/test
|
||||||
|
environment:
|
||||||
|
- WAIT_FOR_HOSTS=example:80
|
||||||
|
depends_on:
|
||||||
|
- example
|
||||||
|
chromedriver:
|
||||||
|
image: blueimp/chromedriver
|
||||||
|
init: true
|
||||||
|
tmpfs: /tmp
|
||||||
|
environment:
|
||||||
|
- DISABLE_X11=false
|
||||||
|
- ENABLE_VNC=true
|
||||||
|
- EXPOSE_X11=true
|
||||||
|
volumes:
|
||||||
|
- ./wdio/assets:/home/webdriver/assets:ro
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:5900:5900
|
||||||
|
geckodriver:
|
||||||
|
image: blueimp/geckodriver
|
||||||
|
init: true
|
||||||
|
tmpfs: /tmp
|
||||||
|
shm_size: 2g
|
||||||
|
environment:
|
||||||
|
- DISABLE_X11=false
|
||||||
|
- ENABLE_VNC=true
|
||||||
|
- EXPOSE_X11=true
|
||||||
|
volumes:
|
||||||
|
- ./wdio/assets:/home/webdriver/assets:ro
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:5901:5900
|
||||||
|
wdio:
|
||||||
|
image: blueimp/wdio
|
||||||
|
init: true
|
||||||
|
read_only: true
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
environment:
|
||||||
|
- WAIT_FOR_HOSTS= chromedriver:4444 geckodriver:4444 example:80
|
||||||
|
- WINDOWS_HOST
|
||||||
|
- MACOS_ASSETS_DIR=$PWD/wdio/assets/
|
||||||
|
- WINDOWS_ASSETS_DIR
|
||||||
|
volumes:
|
||||||
|
- ./wdio:/opt:ro
|
||||||
|
- ./wdio/reports:/opt/reports
|
||||||
|
depends_on:
|
||||||
|
- chromedriver
|
||||||
|
- geckodriver
|
||||||
|
- example
|
566
vendor/blueimp/jquery-file-upload/index.html
vendored
566
vendor/blueimp/jquery-file-upload/index.html
vendored
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* jQuery File Upload Plugin Demo
|
* jQuery File Upload Demo
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
* https://github.com/blueimp/jQuery-File-Upload
|
||||||
*
|
*
|
||||||
* Copyright 2010, Sebastian Tschan
|
* Copyright 2010, Sebastian Tschan
|
||||||
|
@ -12,248 +12,346 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<title>jQuery File Upload Demo</title>
|
<title>jQuery File Upload Demo</title>
|
||||||
<meta name="description" content="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.">
|
<meta
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
name="description"
|
||||||
<!-- Bootstrap styles -->
|
content="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."
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
/>
|
||||||
<!-- Generic page styles -->
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<!-- Bootstrap styles -->
|
||||||
<!-- blueimp Gallery styles -->
|
<link
|
||||||
<link rel="stylesheet" href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
|
rel="stylesheet"
|
||||||
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload.css">
|
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload-ui.css">
|
crossorigin="anonymous"
|
||||||
<!-- CSS adjustments for browsers with JavaScript disabled -->
|
/>
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"></noscript>
|
<!-- Generic page styles -->
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript>
|
<style>
|
||||||
</head>
|
#navigation {
|
||||||
<body>
|
margin: 10px 0;
|
||||||
<div class="navbar navbar-default navbar-fixed-top">
|
}
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
#title,
|
||||||
|
#description {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- blueimp Gallery styles -->
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css"
|
||||||
|
/>
|
||||||
|
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
||||||
|
<link rel="stylesheet" href="css/jquery.fileupload.css" />
|
||||||
|
<link rel="stylesheet" href="css/jquery.fileupload-ui.css" />
|
||||||
|
<!-- CSS adjustments for browsers with JavaScript disabled -->
|
||||||
|
<noscript
|
||||||
|
><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"
|
||||||
|
/></noscript>
|
||||||
|
<noscript
|
||||||
|
><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"
|
||||||
|
/></noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<ul class="nav nav-tabs" id="navigation">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse">
|
<li>
|
||||||
<span class="icon-bar"></span>
|
<a href="https://github.com/blueimp/jQuery-File-Upload">Project</a>
|
||||||
<span class="icon-bar"></span>
|
</li>
|
||||||
<span class="icon-bar"></span>
|
<li class="active">
|
||||||
</button>
|
<a href="#">Demo</a>
|
||||||
<a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
|
</li>
|
||||||
</div>
|
<li>
|
||||||
<div class="navbar-collapse collapse">
|
<a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Wiki</a>
|
||||||
<ul class="nav navbar-nav">
|
</li>
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
|
<li>
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
|
<a href="https://blueimp.net">Author</a>
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
|
</li>
|
||||||
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li>
|
</ul>
|
||||||
</ul>
|
<h1 id="title">jQuery File Upload Demo</h1>
|
||||||
</div>
|
<blockquote id="description">
|
||||||
</div>
|
<p>
|
||||||
</div>
|
File Upload widget with multiple file selection, drag&drop
|
||||||
<div class="container">
|
support, progress bars, validation and preview images, audio and video
|
||||||
<h1>jQuery File Upload Demo</h1>
|
for jQuery.<br />
|
||||||
<h2 class="lead">Basic Plus UI version</h2>
|
Supports cross-domain, chunked and resumable file uploads and
|
||||||
<ul class="nav nav-tabs">
|
client-side image resizing.<br />
|
||||||
<li><a href="basic.html">Basic</a></li>
|
Works with any server-side platform (PHP, Python, Ruby on Rails, Java,
|
||||||
<li><a href="basic-plus.html">Basic Plus</a></li>
|
Node.js, Go etc.) that supports standard HTML form file uploads.
|
||||||
<li class="active"><a href="index.html">Basic Plus UI</a></li>
|
</p>
|
||||||
<li><a href="angularjs.html">AngularJS</a></li>
|
</blockquote>
|
||||||
<li><a href="jquery-ui.html">jQuery UI</a></li>
|
<!-- The file upload form used as target for the file upload widget -->
|
||||||
</ul>
|
<form
|
||||||
<br>
|
id="fileupload"
|
||||||
<blockquote>
|
action="https://jquery-file-upload.appspot.com/"
|
||||||
<p>File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.<br>
|
method="POST"
|
||||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
|
enctype="multipart/form-data"
|
||||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
|
>
|
||||||
</blockquote>
|
|
||||||
<br>
|
|
||||||
<!-- The file upload form used as target for the file upload widget -->
|
|
||||||
<form id="fileupload" action="https://jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">
|
|
||||||
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
||||||
<noscript><input type="hidden" name="redirect" value="https://blueimp.github.io/jQuery-File-Upload/"></noscript>
|
<noscript
|
||||||
|
><input
|
||||||
|
type="hidden"
|
||||||
|
name="redirect"
|
||||||
|
value="https://blueimp.github.io/jQuery-File-Upload/"
|
||||||
|
/></noscript>
|
||||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
||||||
<div class="row fileupload-buttonbar">
|
<div class="row fileupload-buttonbar">
|
||||||
<div class="col-lg-7">
|
<div class="col-lg-7">
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||||
<span class="btn btn-success fileinput-button">
|
<span class="btn btn-success fileinput-button">
|
||||||
<i class="glyphicon glyphicon-plus"></i>
|
<i class="glyphicon glyphicon-plus"></i>
|
||||||
<span>Add files...</span>
|
<span>Add files...</span>
|
||||||
<input type="file" name="files[]" multiple>
|
<input type="file" name="files[]" multiple />
|
||||||
</span>
|
</span>
|
||||||
<button type="submit" class="btn btn-primary start">
|
<button type="submit" class="btn btn-primary start">
|
||||||
<i class="glyphicon glyphicon-upload"></i>
|
<i class="glyphicon glyphicon-upload"></i>
|
||||||
<span>Start upload</span>
|
<span>Start upload</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="reset" class="btn btn-warning cancel">
|
<button type="reset" class="btn btn-warning cancel">
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
||||||
<span>Cancel upload</span>
|
<span>Cancel upload</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-danger delete">
|
<button type="button" class="btn btn-danger delete">
|
||||||
<i class="glyphicon glyphicon-trash"></i>
|
<i class="glyphicon glyphicon-trash"></i>
|
||||||
<span>Delete</span>
|
<span>Delete selected</span>
|
||||||
</button>
|
</button>
|
||||||
<input type="checkbox" class="toggle">
|
<input type="checkbox" class="toggle" />
|
||||||
<!-- The global file processing state -->
|
<!-- The global file processing state -->
|
||||||
<span class="fileupload-process"></span>
|
<span class="fileupload-process"></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- The global progress state -->
|
<!-- The global progress state -->
|
||||||
<div class="col-lg-5 fileupload-progress fade">
|
<div class="col-lg-5 fileupload-progress fade">
|
||||||
<!-- The global progress bar -->
|
<!-- The global progress bar -->
|
||||||
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
<div
|
||||||
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
|
class="progress progress-striped active"
|
||||||
</div>
|
role="progressbar"
|
||||||
<!-- The extended global progress state -->
|
aria-valuemin="0"
|
||||||
<div class="progress-extended"> </div>
|
aria-valuemax="100"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="progress-bar progress-bar-success"
|
||||||
|
style="width: 0%;"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- The extended global progress state -->
|
||||||
|
<div class="progress-extended"> </div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- The table listing the files available for upload/download -->
|
<!-- The table listing the files available for upload/download -->
|
||||||
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
|
<table role="presentation" class="table table-striped">
|
||||||
</form>
|
<tbody class="files"></tbody>
|
||||||
<br>
|
</table>
|
||||||
<div class="panel panel-default">
|
</form>
|
||||||
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">Demo Notes</h3>
|
<h3 class="panel-title">Demo Notes</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>The maximum file size for uploads in this demo is <strong>999 KB</strong> (default file size is unlimited).</li>
|
<li>
|
||||||
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
|
The maximum file size for uploads in this demo is
|
||||||
<li>Uploaded files will be deleted automatically after <strong>5 minutes or less</strong> (demo files are stored in memory).</li>
|
<strong>999 KB</strong> (default file size is unlimited).
|
||||||
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
|
</li>
|
||||||
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
|
<li>
|
||||||
<li>Built with the <a href="http://getbootstrap.com/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
|
Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in
|
||||||
</ul>
|
this demo (by default there is no file type restriction).
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Uploaded files will be deleted automatically after
|
||||||
|
<strong>5 minutes or less</strong> (demo files are stored in
|
||||||
|
memory).
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
You can <strong>drag & drop</strong> files from your desktop
|
||||||
|
on this webpage (see
|
||||||
|
<a
|
||||||
|
href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support"
|
||||||
|
>Browser support</a
|
||||||
|
>).
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Please refer to the
|
||||||
|
<a href="https://github.com/blueimp/jQuery-File-Upload"
|
||||||
|
>project website</a
|
||||||
|
>
|
||||||
|
and
|
||||||
|
<a href="https://github.com/blueimp/jQuery-File-Upload/wiki"
|
||||||
|
>documentation</a
|
||||||
|
>
|
||||||
|
for more information.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Built with the
|
||||||
|
<a href="https://getbootstrap.com/">Bootstrap</a> CSS framework
|
||||||
|
and Icons from <a href="https://glyphicons.com/">Glyphicons</a>.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- The blueimp Gallery widget -->
|
||||||
<!-- The blueimp Gallery widget -->
|
<div
|
||||||
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
|
id="blueimp-gallery"
|
||||||
<div class="slides"></div>
|
class="blueimp-gallery blueimp-gallery-controls"
|
||||||
<h3 class="title"></h3>
|
aria-label="image gallery"
|
||||||
<a class="prev">‹</a>
|
aria-modal="true"
|
||||||
<a class="next">›</a>
|
role="dialog"
|
||||||
<a class="close">×</a>
|
data-filter=":even"
|
||||||
<a class="play-pause"></a>
|
>
|
||||||
<ol class="indicator"></ol>
|
<div class="slides" aria-live="polite"></div>
|
||||||
</div>
|
<h3 class="title"></h3>
|
||||||
<!-- The template to display files available for upload -->
|
<a
|
||||||
<script id="template-upload" type="text/x-tmpl">
|
class="prev"
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
aria-controls="blueimp-gallery"
|
||||||
<tr class="template-upload fade">
|
aria-label="previous slide"
|
||||||
<td>
|
aria-keyshortcuts="ArrowLeft"
|
||||||
<span class="preview"></span>
|
></a>
|
||||||
</td>
|
<a
|
||||||
<td>
|
class="next"
|
||||||
{% if (window.innerWidth > 480 || !o.options.loadImageFileTypes.test(file.type)) { %}
|
aria-controls="blueimp-gallery"
|
||||||
<p class="name">{%=file.name%}</p>
|
aria-label="next slide"
|
||||||
{% } %}
|
aria-keyshortcuts="ArrowRight"
|
||||||
<strong class="error text-danger"></strong>
|
></a>
|
||||||
</td>
|
<a
|
||||||
<td>
|
class="close"
|
||||||
<p class="size">Processing...</p>
|
aria-controls="blueimp-gallery"
|
||||||
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
|
aria-label="close"
|
||||||
</td>
|
aria-keyshortcuts="Escape"
|
||||||
<td>
|
></a>
|
||||||
{% if (!i && !o.options.autoUpload) { %}
|
<a
|
||||||
<button class="btn btn-primary start" disabled>
|
class="play-pause"
|
||||||
<i class="glyphicon glyphicon-upload"></i>
|
aria-controls="blueimp-gallery"
|
||||||
<span>Start</span>
|
aria-label="play slideshow"
|
||||||
</button>
|
aria-keyshortcuts="Space"
|
||||||
{% } %}
|
aria-pressed="false"
|
||||||
{% if (!i) { %}
|
role="button"
|
||||||
<button class="btn btn-warning cancel">
|
></a>
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
<ol class="indicator"></ol>
|
||||||
<span>Cancel</span>
|
</div>
|
||||||
</button>
|
<!-- The template to display files available for upload -->
|
||||||
{% } %}
|
<script id="template-upload" type="text/x-tmpl">
|
||||||
</td>
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||||
</tr>
|
<tr class="template-upload fade{%=o.options.loadImageFileTypes.test(file.type)?' image':''%}">
|
||||||
{% } %}
|
<td>
|
||||||
</script>
|
<span class="preview"></span>
|
||||||
<!-- The template to display files available for download -->
|
</td>
|
||||||
<script id="template-download" type="text/x-tmpl">
|
<td>
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
<p class="name">{%=file.name%}</p>
|
||||||
<tr class="template-download fade">
|
<strong class="error text-danger"></strong>
|
||||||
<td>
|
</td>
|
||||||
<span class="preview">
|
<td>
|
||||||
{% if (file.thumbnailUrl) { %}
|
<p class="size">Processing...</p>
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
|
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
|
||||||
{% } %}
|
</td>
|
||||||
</span>
|
<td>
|
||||||
</td>
|
{% if (!o.options.autoUpload && o.options.edit && o.options.loadImageFileTypes.test(file.type)) { %}
|
||||||
<td>
|
<button class="btn btn-success edit" data-index="{%=i%}" disabled>
|
||||||
{% if (window.innerWidth > 480 || !file.thumbnailUrl) { %}
|
<i class="glyphicon glyphicon-edit"></i>
|
||||||
<p class="name">
|
<span>Edit</span>
|
||||||
{% if (file.url) { %}
|
</button>
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
|
{% } %}
|
||||||
{% } else { %}
|
{% if (!i && !o.options.autoUpload) { %}
|
||||||
<span>{%=file.name%}</span>
|
<button class="btn btn-primary start" disabled>
|
||||||
{% } %}
|
<i class="glyphicon glyphicon-upload"></i>
|
||||||
</p>
|
<span>Start</span>
|
||||||
{% } %}
|
</button>
|
||||||
{% if (file.error) { %}
|
{% } %}
|
||||||
<div><span class="label label-danger">Error</span> {%=file.error%}</div>
|
{% if (!i) { %}
|
||||||
{% } %}
|
<button class="btn btn-warning cancel">
|
||||||
</td>
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
||||||
<td>
|
<span>Cancel</span>
|
||||||
<span class="size">{%=o.formatFileSize(file.size)%}</span>
|
</button>
|
||||||
</td>
|
{% } %}
|
||||||
<td>
|
</td>
|
||||||
{% if (file.deleteUrl) { %}
|
</tr>
|
||||||
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
|
{% } %}
|
||||||
<i class="glyphicon glyphicon-trash"></i>
|
</script>
|
||||||
<span>Delete</span>
|
<!-- The template to display files available for download -->
|
||||||
</button>
|
<script id="template-download" type="text/x-tmpl">
|
||||||
<input type="checkbox" name="delete" value="1" class="toggle">
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||||
{% } else { %}
|
<tr class="template-download fade{%=file.thumbnailUrl?' image':''%}">
|
||||||
<button class="btn btn-warning cancel">
|
<td>
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
<span class="preview">
|
||||||
<span>Cancel</span>
|
{% if (file.thumbnailUrl) { %}
|
||||||
</button>
|
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
|
||||||
{% } %}
|
{% } %}
|
||||||
</td>
|
</span>
|
||||||
</tr>
|
</td>
|
||||||
{% } %}
|
<td>
|
||||||
</script>
|
<p class="name">
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
{% if (file.url) { %}
|
||||||
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
|
||||||
<script src="js/vendor/jquery.ui.widget.js"></script>
|
{% } else { %}
|
||||||
<!-- The Templates plugin is included to render the upload/download listings -->
|
<span>{%=file.name%}</span>
|
||||||
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
|
{% } %}
|
||||||
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
|
</p>
|
||||||
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
{% if (file.error) { %}
|
||||||
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
|
<div><span class="label label-danger">Error</span> {%=file.error%}</div>
|
||||||
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
{% } %}
|
||||||
<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
|
</td>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
<td>
|
||||||
<!-- blueimp Gallery script -->
|
<span class="size">{%=o.formatFileSize(file.size)%}</span>
|
||||||
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
|
</td>
|
||||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
<td>
|
||||||
<script src="js/jquery.iframe-transport.js"></script>
|
{% if (file.deleteUrl) { %}
|
||||||
<!-- The basic File Upload plugin -->
|
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
|
||||||
<script src="js/jquery.fileupload.js"></script>
|
<i class="glyphicon glyphicon-trash"></i>
|
||||||
<!-- The File Upload processing plugin -->
|
<span>Delete</span>
|
||||||
<script src="js/jquery.fileupload-process.js"></script>
|
</button>
|
||||||
<!-- The File Upload image preview & resize plugin -->
|
<input type="checkbox" name="delete" value="1" class="toggle">
|
||||||
<script src="js/jquery.fileupload-image.js"></script>
|
{% } else { %}
|
||||||
<!-- The File Upload audio preview plugin -->
|
<button class="btn btn-warning cancel">
|
||||||
<script src="js/jquery.fileupload-audio.js"></script>
|
<i class="glyphicon glyphicon-ban-circle"></i>
|
||||||
<!-- The File Upload video preview plugin -->
|
<span>Cancel</span>
|
||||||
<script src="js/jquery.fileupload-video.js"></script>
|
</button>
|
||||||
<!-- The File Upload validation plugin -->
|
{% } %}
|
||||||
<script src="js/jquery.fileupload-validate.js"></script>
|
</td>
|
||||||
<!-- The File Upload user interface plugin -->
|
</tr>
|
||||||
<script src="js/jquery.fileupload-ui.js"></script>
|
{% } %}
|
||||||
<!-- The main application script -->
|
</script>
|
||||||
<script src="js/main.js"></script>
|
<script
|
||||||
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
|
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
|
||||||
<!--[if (gte IE 8)&(lt IE 10)]>
|
integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
|
||||||
<script src="js/cors/jquery.xdr-transport.js"></script>
|
crossorigin="anonymous"
|
||||||
<![endif]-->
|
></script>
|
||||||
</body>
|
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
|
||||||
|
<script src="js/vendor/jquery.ui.widget.js"></script>
|
||||||
|
<!-- The Templates plugin is included to render the upload/download listings -->
|
||||||
|
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
|
||||||
|
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
|
||||||
|
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
||||||
|
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
|
||||||
|
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
||||||
|
<!-- blueimp Gallery script -->
|
||||||
|
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
|
||||||
|
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
||||||
|
<script src="js/jquery.iframe-transport.js"></script>
|
||||||
|
<!-- The basic File Upload plugin -->
|
||||||
|
<script src="js/jquery.fileupload.js"></script>
|
||||||
|
<!-- The File Upload processing plugin -->
|
||||||
|
<script src="js/jquery.fileupload-process.js"></script>
|
||||||
|
<!-- The File Upload image preview & resize plugin -->
|
||||||
|
<script src="js/jquery.fileupload-image.js"></script>
|
||||||
|
<!-- The File Upload audio preview plugin -->
|
||||||
|
<script src="js/jquery.fileupload-audio.js"></script>
|
||||||
|
<!-- The File Upload video preview plugin -->
|
||||||
|
<script src="js/jquery.fileupload-video.js"></script>
|
||||||
|
<!-- The File Upload validation plugin -->
|
||||||
|
<script src="js/jquery.fileupload-validate.js"></script>
|
||||||
|
<!-- The File Upload user interface plugin -->
|
||||||
|
<script src="js/jquery.fileupload-ui.js"></script>
|
||||||
|
<!-- The main application script -->
|
||||||
|
<script src="js/demo.js"></script>
|
||||||
|
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
|
||||||
|
<!--[if (gte IE 8)&(lt IE 10)]>
|
||||||
|
<script src="js/cors/jquery.xdr-transport.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
256
vendor/blueimp/jquery-file-upload/jquery-ui.html
vendored
256
vendor/blueimp/jquery-file-upload/jquery-ui.html
vendored
|
@ -1,256 +0,0 @@
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin jQuery UI Demo
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
|
||||||
<!--[if IE]>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<![endif]-->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>jQuery File Upload Demo - jQuery UI version</title>
|
|
||||||
<meta name="description" content="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.">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<!-- jQuery UI styles -->
|
|
||||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/dark-hive/jquery-ui.css" integrity="sha384-ufZtQaOYGuy/CibAC5jmelOpBu3H78Js7HrXSLo4LGccHUrGGHXt+uaTcDbio3kI" crossorigin="anonymous">
|
|
||||||
<!-- Generic page styles -->
|
|
||||||
<link rel="stylesheet" href="css/style.css">
|
|
||||||
<!-- Demo styles -->
|
|
||||||
<link rel="stylesheet" href="css/jquery-ui-demo.css">
|
|
||||||
<!--[if lte IE 8]>
|
|
||||||
<link rel="stylesheet" href="css/jquery-ui-demo-ie8.css">
|
|
||||||
<![endif]-->
|
|
||||||
<style>
|
|
||||||
/* Adjust the jQuery UI widget font-size: */
|
|
||||||
.ui-widget {
|
|
||||||
font-size: 0.95em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- blueimp Gallery styles -->
|
|
||||||
<link rel="stylesheet" href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
|
|
||||||
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload.css">
|
|
||||||
<link rel="stylesheet" href="css/jquery.fileupload-ui.css">
|
|
||||||
<!-- CSS adjustments for browsers with JavaScript disabled -->
|
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"></noscript>
|
|
||||||
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<ul class="navigation">
|
|
||||||
<li><h3><a href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a></h3></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
|
|
||||||
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
|
|
||||||
<li><a href="https://blueimp.net">© blueimp.net</a></li>
|
|
||||||
</ul>
|
|
||||||
<h1>jQuery File Upload Demo</h1>
|
|
||||||
<h2>jQuery UI version</h2>
|
|
||||||
<form>
|
|
||||||
<label for="theme-switcher">Theme:</label>
|
|
||||||
<select id="theme-switcher" class="pull-right">
|
|
||||||
<option value="black-tie">Black Tie</option>
|
|
||||||
<option value="blitzer">Blitzer</option>
|
|
||||||
<option value="cupertino">Cupertino</option>
|
|
||||||
<option value="dark-hive" selected>Dark Hive</option>
|
|
||||||
<option value="dot-luv">Dot Luv</option>
|
|
||||||
<option value="eggplant">Eggplant</option>
|
|
||||||
<option value="excite-bike">Excite Bike</option>
|
|
||||||
<option value="flick">Flick</option>
|
|
||||||
<option value="hot-sneaks">Hot sneaks</option>
|
|
||||||
<option value="humanity">Humanity</option>
|
|
||||||
<option value="le-frog">Le Frog</option>
|
|
||||||
<option value="mint-choc">Mint Choc</option>
|
|
||||||
<option value="overcast">Overcast</option>
|
|
||||||
<option value="pepper-grinder">Pepper Grinder</option>
|
|
||||||
<option value="redmond">Redmond</option>
|
|
||||||
<option value="smoothness">Smoothness</option>
|
|
||||||
<option value="south-street">South Street</option>
|
|
||||||
<option value="start">Start</option>
|
|
||||||
<option value="sunny">Sunny</option>
|
|
||||||
<option value="swanky-purse">Swanky Purse</option>
|
|
||||||
<option value="trontastic">Trontastic</option>
|
|
||||||
<option value="ui-darkness">UI Darkness</option>
|
|
||||||
<option value="ui-lightness">UI Lightness</option>
|
|
||||||
<option value="vader">Vader</option>
|
|
||||||
</select>
|
|
||||||
</form>
|
|
||||||
<ul class="navigation">
|
|
||||||
<li><a href="basic.html">Basic</a></li>
|
|
||||||
<li><a href="basic-plus.html">Basic Plus</a></li>
|
|
||||||
<li><a href="index.html">Basic Plus UI</a></li>
|
|
||||||
<li><a href="angularjs.html">AngularJS</a></li>
|
|
||||||
<li class="active"><a href="jquery-ui.html">jQuery UI</a></li>
|
|
||||||
</ul>
|
|
||||||
<blockquote>
|
|
||||||
<p>File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery UI.<br>
|
|
||||||
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
|
|
||||||
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
|
|
||||||
</blockquote>
|
|
||||||
<!-- The file upload form used as target for the file upload widget -->
|
|
||||||
<form id="fileupload" action="https://jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">
|
|
||||||
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
|
||||||
<noscript><input type="hidden" name="redirect" value="https://blueimp.github.io/jQuery-File-Upload/"></noscript>
|
|
||||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
|
||||||
<div class="fileupload-buttonbar">
|
|
||||||
<div class="fileupload-buttons">
|
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
|
||||||
<span class="fileinput-button">
|
|
||||||
<span>Add files...</span>
|
|
||||||
<input type="file" name="files[]" multiple>
|
|
||||||
</span>
|
|
||||||
<button type="submit" class="start">Start upload</button>
|
|
||||||
<button type="reset" class="cancel">Cancel upload</button>
|
|
||||||
<button type="button" class="delete">Delete</button>
|
|
||||||
<input type="checkbox" class="toggle">
|
|
||||||
<!-- The global file processing state -->
|
|
||||||
<span class="fileupload-process"></span>
|
|
||||||
</div>
|
|
||||||
<!-- The global progress state -->
|
|
||||||
<div class="fileupload-progress fade" style="display:none">
|
|
||||||
<!-- The global progress bar -->
|
|
||||||
<div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
|
|
||||||
<!-- The extended global progress state -->
|
|
||||||
<div class="progress-extended"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- The table listing the files available for upload/download -->
|
|
||||||
<table role="presentation"><tbody class="files"></tbody></table>
|
|
||||||
</form>
|
|
||||||
<br>
|
|
||||||
<h3>Demo Notes</h3>
|
|
||||||
<ul>
|
|
||||||
<li>The maximum file size for uploads in this demo is <strong>999 KB</strong> (default file size is unlimited).</li>
|
|
||||||
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
|
|
||||||
<li>Uploaded files will be deleted automatically after <strong>5 minutes or less</strong> (demo files are stored in memory).</li>
|
|
||||||
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
|
|
||||||
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
|
|
||||||
<li>Built with <a href="https://jqueryui.com">jQuery UI</a>.</li>
|
|
||||||
</ul>
|
|
||||||
<!-- The blueimp Gallery widget -->
|
|
||||||
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
|
|
||||||
<div class="slides"></div>
|
|
||||||
<h3 class="title"></h3>
|
|
||||||
<a class="prev">‹</a>
|
|
||||||
<a class="next">›</a>
|
|
||||||
<a class="close">×</a>
|
|
||||||
<a class="play-pause"></a>
|
|
||||||
<ol class="indicator"></ol>
|
|
||||||
</div>
|
|
||||||
<!-- The template to display files available for upload -->
|
|
||||||
<script id="template-upload" type="text/x-tmpl">
|
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
||||||
<tr class="template-upload fade">
|
|
||||||
<td>
|
|
||||||
<span class="preview"></span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if (window.innerWidth > 480 || !o.options.loadImageFileTypes.test(file.type)) { %}
|
|
||||||
<p class="name">{%=file.name%}</p>
|
|
||||||
{% } %}
|
|
||||||
<strong class="error"></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="size">Processing...</p>
|
|
||||||
<div class="progress"></div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if (!i && !o.options.autoUpload) { %}
|
|
||||||
<button class="start" disabled>Start</button>
|
|
||||||
{% } %}
|
|
||||||
{% if (!i) { %}
|
|
||||||
<button class="cancel">Cancel</button>
|
|
||||||
{% } %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% } %}
|
|
||||||
</script>
|
|
||||||
<!-- The template to display files available for download -->
|
|
||||||
<script id="template-download" type="text/x-tmpl">
|
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
||||||
<tr class="template-download fade">
|
|
||||||
<td>
|
|
||||||
<span class="preview">
|
|
||||||
{% if (file.thumbnailUrl) { %}
|
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
|
|
||||||
{% } %}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if (window.innerWidth > 480 || !file.thumbnailUrl) { %}
|
|
||||||
<p class="name">
|
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
|
|
||||||
</p>
|
|
||||||
{% } %}
|
|
||||||
{% if (file.error) { %}
|
|
||||||
<div><span class="error">Error</span> {%=file.error%}</div>
|
|
||||||
{% } %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="size">{%=o.formatFileSize(file.size)%}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button class="delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>Delete</button>
|
|
||||||
<input type="checkbox" name="delete" value="1" class="toggle">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% } %}
|
|
||||||
</script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" crossorigin="anonymous"></script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha384-Dziy8F2VlJQLMShA6FHWNul/veM9bCkRUaLqr199K94ntO5QUrLJBEbYegdSkkqX" crossorigin="anonymous"></script>
|
|
||||||
<!-- The Templates plugin is included to render the upload/download listings -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
|
|
||||||
<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
|
||||||
<!-- The Canvas to Blob plugin is included for image resizing functionality -->
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
|
||||||
<!-- blueimp Gallery script -->
|
|
||||||
<script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
|
|
||||||
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
|
|
||||||
<script src="js/jquery.iframe-transport.js"></script>
|
|
||||||
<!-- The basic File Upload plugin -->
|
|
||||||
<script src="js/jquery.fileupload.js"></script>
|
|
||||||
<!-- The File Upload processing plugin -->
|
|
||||||
<script src="js/jquery.fileupload-process.js"></script>
|
|
||||||
<!-- The File Upload image preview & resize plugin -->
|
|
||||||
<script src="js/jquery.fileupload-image.js"></script>
|
|
||||||
<!-- The File Upload audio preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-audio.js"></script>
|
|
||||||
<!-- The File Upload video preview plugin -->
|
|
||||||
<script src="js/jquery.fileupload-video.js"></script>
|
|
||||||
<!-- The File Upload validation plugin -->
|
|
||||||
<script src="js/jquery.fileupload-validate.js"></script>
|
|
||||||
<!-- The File Upload user interface plugin -->
|
|
||||||
<script src="js/jquery.fileupload-ui.js"></script>
|
|
||||||
<!-- The File Upload jQuery UI plugin -->
|
|
||||||
<script src="js/jquery.fileupload-jquery-ui.js"></script>
|
|
||||||
<!-- The main application script -->
|
|
||||||
<script src="js/main.js"></script>
|
|
||||||
<script>
|
|
||||||
// Initialize the jQuery UI theme switcher:
|
|
||||||
$('#theme-switcher').change(function () {
|
|
||||||
var theme = $('#theme');
|
|
||||||
theme.prop(
|
|
||||||
'href',
|
|
||||||
theme.prop('href').replace(
|
|
||||||
/[\w\-]+\/jquery-ui.css/,
|
|
||||||
$(this).val() + '/jquery-ui.css'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
|
|
||||||
<!--[if (gte IE 8)&(lt IE 10)]>
|
|
||||||
<script src="js/cors/jquery.xdr-transport.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
101
vendor/blueimp/jquery-file-upload/js/app.js
vendored
101
vendor/blueimp/jquery-file-upload/js/app.js
vendored
|
@ -1,101 +0,0 @@
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin Angular JS Example
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* jshint nomen:false */
|
|
||||||
/* global window, angular */
|
|
||||||
|
|
||||||
;(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var isOnGitHub = window.location.hostname === 'blueimp.github.io',
|
|
||||||
url = isOnGitHub ? '//jquery-file-upload.appspot.com/' : 'server/php/';
|
|
||||||
|
|
||||||
angular.module('demo', [
|
|
||||||
'blueimp.fileupload'
|
|
||||||
])
|
|
||||||
.config([
|
|
||||||
'$httpProvider', 'fileUploadProvider',
|
|
||||||
function ($httpProvider, fileUploadProvider) {
|
|
||||||
delete $httpProvider.defaults.headers.common['X-Requested-With'];
|
|
||||||
fileUploadProvider.defaults.redirect = window.location.href.replace(
|
|
||||||
/\/[^\/]*$/,
|
|
||||||
'/cors/result.html?%s'
|
|
||||||
);
|
|
||||||
if (isOnGitHub) {
|
|
||||||
// Demo settings:
|
|
||||||
angular.extend(fileUploadProvider.defaults, {
|
|
||||||
// Enable image resizing, except for Android and Opera,
|
|
||||||
// which actually support image resizing, but fail to
|
|
||||||
// send Blob objects via XHR requests:
|
|
||||||
disableImageResize: /Android(?!.*Chrome)|Opera/
|
|
||||||
.test(window.navigator.userAgent),
|
|
||||||
maxFileSize: 999000,
|
|
||||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
.controller('DemoFileUploadController', [
|
|
||||||
'$scope', '$http', '$filter', '$window',
|
|
||||||
function ($scope, $http) {
|
|
||||||
$scope.options = {
|
|
||||||
url: url
|
|
||||||
};
|
|
||||||
if (!isOnGitHub) {
|
|
||||||
$scope.loadingFiles = true;
|
|
||||||
$http.get(url)
|
|
||||||
.then(
|
|
||||||
function (response) {
|
|
||||||
$scope.loadingFiles = false;
|
|
||||||
$scope.queue = response.data.files || [];
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
$scope.loadingFiles = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
.controller('FileDestroyController', [
|
|
||||||
'$scope', '$http',
|
|
||||||
function ($scope, $http) {
|
|
||||||
var file = $scope.file,
|
|
||||||
state;
|
|
||||||
if (file.url) {
|
|
||||||
file.$state = function () {
|
|
||||||
return state;
|
|
||||||
};
|
|
||||||
file.$destroy = function () {
|
|
||||||
state = 'pending';
|
|
||||||
return $http({
|
|
||||||
url: file.deleteUrl,
|
|
||||||
method: file.deleteType
|
|
||||||
}).then(
|
|
||||||
function () {
|
|
||||||
state = 'resolved';
|
|
||||||
$scope.clear(file);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
state = 'rejected';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
} else if (!file.$cancel && !file._index) {
|
|
||||||
file.$cancel = function () {
|
|
||||||
$scope.clear(file);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
}());
|
|
|
@ -9,118 +9,118 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global define, require, window, document */
|
/* global define, require */
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
} else if (typeof exports === 'object') {
|
} else if (typeof exports === 'object') {
|
||||||
// Node/CommonJS:
|
// Node/CommonJS:
|
||||||
factory(require('jquery'));
|
factory(require('jquery'));
|
||||||
} else {
|
} else {
|
||||||
// Browser globals:
|
// Browser globals:
|
||||||
factory(window.jQuery);
|
factory(window.jQuery);
|
||||||
|
}
|
||||||
|
})(function ($) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var counter = 0,
|
||||||
|
names = [
|
||||||
|
'accepts',
|
||||||
|
'cache',
|
||||||
|
'contents',
|
||||||
|
'contentType',
|
||||||
|
'crossDomain',
|
||||||
|
'data',
|
||||||
|
'dataType',
|
||||||
|
'headers',
|
||||||
|
'ifModified',
|
||||||
|
'mimeType',
|
||||||
|
'password',
|
||||||
|
'processData',
|
||||||
|
'timeout',
|
||||||
|
'traditional',
|
||||||
|
'type',
|
||||||
|
'url',
|
||||||
|
'username'
|
||||||
|
],
|
||||||
|
convert = function (p) {
|
||||||
|
return p;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajaxSetup({
|
||||||
|
converters: {
|
||||||
|
'postmessage text': convert,
|
||||||
|
'postmessage json': convert,
|
||||||
|
'postmessage html': convert
|
||||||
}
|
}
|
||||||
}(function ($) {
|
});
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var counter = 0,
|
$.ajaxTransport('postmessage', function (options) {
|
||||||
names = [
|
if (options.postMessage && window.postMessage) {
|
||||||
'accepts',
|
var iframe,
|
||||||
'cache',
|
loc = $('<a></a>').prop('href', options.postMessage)[0],
|
||||||
'contents',
|
target = loc.protocol + '//' + loc.host,
|
||||||
'contentType',
|
xhrUpload = options.xhr().upload;
|
||||||
'crossDomain',
|
// IE always includes the port for the host property of a link
|
||||||
'data',
|
// element, but not in the location.host or origin property for the
|
||||||
'dataType',
|
// default http port 80 and https port 443, so we strip it:
|
||||||
'headers',
|
if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) {
|
||||||
'ifModified',
|
target = target.replace(/:(80|443)$/, '');
|
||||||
'mimeType',
|
}
|
||||||
'password',
|
return {
|
||||||
'processData',
|
send: function (_, completeCallback) {
|
||||||
'timeout',
|
counter += 1;
|
||||||
'traditional',
|
var message = {
|
||||||
'type',
|
id: 'postmessage-transport-' + counter
|
||||||
'url',
|
},
|
||||||
'username'
|
eventName = 'message.' + message.id;
|
||||||
],
|
iframe = $(
|
||||||
convert = function (p) {
|
'<iframe style="display:none;" src="' +
|
||||||
return p;
|
options.postMessage +
|
||||||
};
|
'" name="' +
|
||||||
|
message.id +
|
||||||
$.ajaxSetup({
|
'"></iframe>'
|
||||||
converters: {
|
)
|
||||||
'postmessage text': convert,
|
.on('load', function () {
|
||||||
'postmessage json': convert,
|
$.each(names, function (i, name) {
|
||||||
'postmessage html': convert
|
message[name] = options[name];
|
||||||
}
|
});
|
||||||
});
|
message.dataType = message.dataType.replace('postmessage ', '');
|
||||||
|
$(window).on(eventName, function (event) {
|
||||||
$.ajaxTransport('postmessage', function (options) {
|
var e = event.originalEvent;
|
||||||
if (options.postMessage && window.postMessage) {
|
var data = e.data;
|
||||||
var iframe,
|
var ev;
|
||||||
loc = $('<a>').prop('href', options.postMessage)[0],
|
if (e.origin === target && data.id === message.id) {
|
||||||
target = loc.protocol + '//' + loc.host,
|
if (data.type === 'progress') {
|
||||||
xhrUpload = options.xhr().upload;
|
ev = document.createEvent('Event');
|
||||||
// IE always includes the port for the host property of a link
|
ev.initEvent(data.type, false, true);
|
||||||
// element, but not in the location.host or origin property for the
|
$.extend(ev, data);
|
||||||
// default http port 80 and https port 443, so we strip it:
|
xhrUpload.dispatchEvent(ev);
|
||||||
if (/^(http:\/\/.+:80)|(https:\/\/.+:443)$/.test(target)) {
|
} else {
|
||||||
target = target.replace(/:(80|443)$/, '');
|
completeCallback(
|
||||||
}
|
data.status,
|
||||||
return {
|
data.statusText,
|
||||||
send: function (_, completeCallback) {
|
{ postmessage: data.result },
|
||||||
counter += 1;
|
data.headers
|
||||||
var message = {
|
);
|
||||||
id: 'postmessage-transport-' + counter
|
iframe.remove();
|
||||||
},
|
$(window).off(eventName);
|
||||||
eventName = 'message.' + message.id;
|
}
|
||||||
iframe = $(
|
|
||||||
'<iframe style="display:none;" src="' +
|
|
||||||
options.postMessage + '" name="' +
|
|
||||||
message.id + '"></iframe>'
|
|
||||||
).bind('load', function () {
|
|
||||||
$.each(names, function (i, name) {
|
|
||||||
message[name] = options[name];
|
|
||||||
});
|
|
||||||
message.dataType = message.dataType.replace('postmessage ', '');
|
|
||||||
$(window).bind(eventName, function (e) {
|
|
||||||
e = e.originalEvent;
|
|
||||||
var data = e.data,
|
|
||||||
ev;
|
|
||||||
if (e.origin === target && data.id === message.id) {
|
|
||||||
if (data.type === 'progress') {
|
|
||||||
ev = document.createEvent('Event');
|
|
||||||
ev.initEvent(data.type, false, true);
|
|
||||||
$.extend(ev, data);
|
|
||||||
xhrUpload.dispatchEvent(ev);
|
|
||||||
} else {
|
|
||||||
completeCallback(
|
|
||||||
data.status,
|
|
||||||
data.statusText,
|
|
||||||
{postmessage: data.result},
|
|
||||||
data.headers
|
|
||||||
);
|
|
||||||
iframe.remove();
|
|
||||||
$(window).unbind(eventName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
iframe[0].contentWindow.postMessage(
|
|
||||||
message,
|
|
||||||
target
|
|
||||||
);
|
|
||||||
}).appendTo(document.body);
|
|
||||||
},
|
|
||||||
abort: function () {
|
|
||||||
if (iframe) {
|
|
||||||
iframe.remove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
iframe[0].contentWindow.postMessage(message, target);
|
||||||
|
})
|
||||||
|
.appendTo(document.body);
|
||||||
|
},
|
||||||
|
abort: function () {
|
||||||
|
if (iframe) {
|
||||||
|
iframe.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
}
|
||||||
}));
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -12,78 +12,86 @@
|
||||||
* https://github.com/jaubourg/ajaxHooks/
|
* https://github.com/jaubourg/ajaxHooks/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global define, require, window, XDomainRequest */
|
/* global define, require, XDomainRequest */
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
} else if (typeof exports === 'object') {
|
} else if (typeof exports === 'object') {
|
||||||
// Node/CommonJS:
|
// Node/CommonJS:
|
||||||
factory(require('jquery'));
|
factory(require('jquery'));
|
||||||
} else {
|
} else {
|
||||||
// Browser globals:
|
// Browser globals:
|
||||||
factory(window.jQuery);
|
factory(window.jQuery);
|
||||||
}
|
}
|
||||||
}(function ($) {
|
})(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (window.XDomainRequest && !$.support.cors) {
|
if (window.XDomainRequest && !$.support.cors) {
|
||||||
$.ajaxTransport(function (s) {
|
$.ajaxTransport(function (s) {
|
||||||
if (s.crossDomain && s.async) {
|
if (s.crossDomain && s.async) {
|
||||||
if (s.timeout) {
|
if (s.timeout) {
|
||||||
s.xdrTimeout = s.timeout;
|
s.xdrTimeout = s.timeout;
|
||||||
delete s.timeout;
|
delete s.timeout;
|
||||||
}
|
}
|
||||||
var xdr;
|
var xdr;
|
||||||
return {
|
return {
|
||||||
send: function (headers, completeCallback) {
|
send: function (headers, completeCallback) {
|
||||||
var addParamChar = /\?/.test(s.url) ? '&' : '?';
|
var addParamChar = /\?/.test(s.url) ? '&' : '?';
|
||||||
function callback(status, statusText, responses, responseHeaders) {
|
/**
|
||||||
xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
|
* Callback wrapper function
|
||||||
xdr = null;
|
*
|
||||||
completeCallback(status, statusText, responses, responseHeaders);
|
* @param {number} status HTTP status code
|
||||||
}
|
* @param {string} statusText HTTP status text
|
||||||
xdr = new XDomainRequest();
|
* @param {object} [responses] Content-type specific responses
|
||||||
// XDomainRequest only supports GET and POST:
|
* @param {string} [responseHeaders] Response headers string
|
||||||
if (s.type === 'DELETE') {
|
*/
|
||||||
s.url = s.url + addParamChar + '_method=DELETE';
|
function callback(status, statusText, responses, responseHeaders) {
|
||||||
s.type = 'POST';
|
xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
|
||||||
} else if (s.type === 'PUT') {
|
xdr = null;
|
||||||
s.url = s.url + addParamChar + '_method=PUT';
|
completeCallback(status, statusText, responses, responseHeaders);
|
||||||
s.type = 'POST';
|
|
||||||
} else if (s.type === 'PATCH') {
|
|
||||||
s.url = s.url + addParamChar + '_method=PATCH';
|
|
||||||
s.type = 'POST';
|
|
||||||
}
|
|
||||||
xdr.open(s.type, s.url);
|
|
||||||
xdr.onload = function () {
|
|
||||||
callback(
|
|
||||||
200,
|
|
||||||
'OK',
|
|
||||||
{text: xdr.responseText},
|
|
||||||
'Content-Type: ' + xdr.contentType
|
|
||||||
);
|
|
||||||
};
|
|
||||||
xdr.onerror = function () {
|
|
||||||
callback(404, 'Not Found');
|
|
||||||
};
|
|
||||||
if (s.xdrTimeout) {
|
|
||||||
xdr.ontimeout = function () {
|
|
||||||
callback(0, 'timeout');
|
|
||||||
};
|
|
||||||
xdr.timeout = s.xdrTimeout;
|
|
||||||
}
|
|
||||||
xdr.send((s.hasContent && s.data) || null);
|
|
||||||
},
|
|
||||||
abort: function () {
|
|
||||||
if (xdr) {
|
|
||||||
xdr.onerror = $.noop();
|
|
||||||
xdr.abort();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
xdr = new XDomainRequest();
|
||||||
}
|
// XDomainRequest only supports GET and POST:
|
||||||
}));
|
if (s.type === 'DELETE') {
|
||||||
|
s.url = s.url + addParamChar + '_method=DELETE';
|
||||||
|
s.type = 'POST';
|
||||||
|
} else if (s.type === 'PUT') {
|
||||||
|
s.url = s.url + addParamChar + '_method=PUT';
|
||||||
|
s.type = 'POST';
|
||||||
|
} else if (s.type === 'PATCH') {
|
||||||
|
s.url = s.url + addParamChar + '_method=PATCH';
|
||||||
|
s.type = 'POST';
|
||||||
|
}
|
||||||
|
xdr.open(s.type, s.url);
|
||||||
|
xdr.onload = function () {
|
||||||
|
callback(
|
||||||
|
200,
|
||||||
|
'OK',
|
||||||
|
{ text: xdr.responseText },
|
||||||
|
'Content-Type: ' + xdr.contentType
|
||||||
|
);
|
||||||
|
};
|
||||||
|
xdr.onerror = function () {
|
||||||
|
callback(404, 'Not Found');
|
||||||
|
};
|
||||||
|
if (s.xdrTimeout) {
|
||||||
|
xdr.ontimeout = function () {
|
||||||
|
callback(0, 'timeout');
|
||||||
|
};
|
||||||
|
xdr.timeout = s.xdrTimeout;
|
||||||
|
}
|
||||||
|
xdr.send((s.hasContent && s.data) || null);
|
||||||
|
},
|
||||||
|
abort: function () {
|
||||||
|
if (xdr) {
|
||||||
|
xdr.onerror = $.noop();
|
||||||
|
xdr.abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
75
vendor/blueimp/jquery-file-upload/js/demo.js
vendored
Normal file
75
vendor/blueimp/jquery-file-upload/js/demo.js
vendored
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* jQuery File Upload Demo
|
||||||
|
* https://github.com/blueimp/jQuery-File-Upload
|
||||||
|
*
|
||||||
|
* Copyright 2010, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global $ */
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Initialize the jQuery File Upload widget:
|
||||||
|
$('#fileupload').fileupload({
|
||||||
|
// Uncomment the following to send cross-domain cookies:
|
||||||
|
//xhrFields: {withCredentials: true},
|
||||||
|
url: 'server/php/'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Enable iframe cross-domain access via redirect option:
|
||||||
|
$('#fileupload').fileupload(
|
||||||
|
'option',
|
||||||
|
'redirect',
|
||||||
|
window.location.href.replace(/\/[^/]*$/, '/cors/result.html?%s')
|
||||||
|
);
|
||||||
|
|
||||||
|
if (window.location.hostname === 'blueimp.github.io') {
|
||||||
|
// Demo settings:
|
||||||
|
$('#fileupload').fileupload('option', {
|
||||||
|
url: '//jquery-file-upload.appspot.com/',
|
||||||
|
// Enable image resizing, except for Android and Opera,
|
||||||
|
// which actually support image resizing, but fail to
|
||||||
|
// send Blob objects via XHR requests:
|
||||||
|
disableImageResize: /Android(?!.*Chrome)|Opera/.test(
|
||||||
|
window.navigator.userAgent
|
||||||
|
),
|
||||||
|
maxFileSize: 999000,
|
||||||
|
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
|
||||||
|
});
|
||||||
|
// Upload server status check for browsers with CORS support:
|
||||||
|
if ($.support.cors) {
|
||||||
|
$.ajax({
|
||||||
|
url: '//jquery-file-upload.appspot.com/',
|
||||||
|
type: 'HEAD'
|
||||||
|
}).fail(function () {
|
||||||
|
$('<div class="alert alert-danger"></div>')
|
||||||
|
.text('Upload server currently unavailable - ' + new Date())
|
||||||
|
.appendTo('#fileupload');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Load existing files:
|
||||||
|
$('#fileupload').addClass('fileupload-processing');
|
||||||
|
$.ajax({
|
||||||
|
// Uncomment the following to send cross-domain cookies:
|
||||||
|
//xhrFields: {withCredentials: true},
|
||||||
|
url: $('#fileupload').fileupload('option', 'url'),
|
||||||
|
dataType: 'json',
|
||||||
|
context: $('#fileupload')[0]
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
|
$(this).removeClass('fileupload-processing');
|
||||||
|
})
|
||||||
|
.done(function (result) {
|
||||||
|
$(this)
|
||||||
|
.fileupload('option', 'done')
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
.call(this, $.Event('done'), { result: result });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,438 +0,0 @@
|
||||||
/*
|
|
||||||
* jQuery File Upload AngularJS Plugin
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* jshint nomen:false */
|
|
||||||
/* global define, angular, require */
|
|
||||||
|
|
||||||
;(function (factory) {
|
|
||||||
'use strict';
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// Register as an anonymous AMD module:
|
|
||||||
define([
|
|
||||||
'jquery',
|
|
||||||
'angular',
|
|
||||||
'./jquery.fileupload-image',
|
|
||||||
'./jquery.fileupload-audio',
|
|
||||||
'./jquery.fileupload-video',
|
|
||||||
'./jquery.fileupload-validate'
|
|
||||||
], factory);
|
|
||||||
} else if (typeof exports === 'object') {
|
|
||||||
// Node/CommonJS:
|
|
||||||
factory(
|
|
||||||
require('jquery'),
|
|
||||||
require('angular'),
|
|
||||||
require('./jquery.fileupload-image'),
|
|
||||||
require('./jquery.fileupload-audio'),
|
|
||||||
require('./jquery.fileupload-video'),
|
|
||||||
require('./jquery.fileupload-validate')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
factory();
|
|
||||||
}
|
|
||||||
}(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module('blueimp.fileupload', [])
|
|
||||||
|
|
||||||
// The fileUpload service provides configuration options
|
|
||||||
// for the fileUpload directive and default handlers for
|
|
||||||
// File Upload events:
|
|
||||||
.provider('fileUpload', function () {
|
|
||||||
var scopeEvalAsync = function (expression) {
|
|
||||||
var scope = angular.element(this)
|
|
||||||
.fileupload('option', 'scope');
|
|
||||||
// Schedule a new $digest cycle if not already inside of one
|
|
||||||
// and evaluate the given expression:
|
|
||||||
scope.$evalAsync(expression);
|
|
||||||
},
|
|
||||||
addFileMethods = function (scope, data) {
|
|
||||||
var files = data.files,
|
|
||||||
file = files[0];
|
|
||||||
angular.forEach(files, function (file, index) {
|
|
||||||
file._index = index;
|
|
||||||
file.$state = function () {
|
|
||||||
return data.state();
|
|
||||||
};
|
|
||||||
file.$processing = function () {
|
|
||||||
return data.processing();
|
|
||||||
};
|
|
||||||
file.$progress = function () {
|
|
||||||
return data.progress();
|
|
||||||
};
|
|
||||||
file.$response = function () {
|
|
||||||
return data.response();
|
|
||||||
};
|
|
||||||
});
|
|
||||||
file.$submit = function () {
|
|
||||||
if (!file.error) {
|
|
||||||
return data.submit();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
file.$cancel = function () {
|
|
||||||
return data.abort();
|
|
||||||
};
|
|
||||||
},
|
|
||||||
$config;
|
|
||||||
$config = this.defaults = {
|
|
||||||
handleResponse: function (e, data) {
|
|
||||||
var files = data.result && data.result.files;
|
|
||||||
if (files) {
|
|
||||||
data.scope.replace(data.files, files);
|
|
||||||
} else if (data.errorThrown ||
|
|
||||||
data.textStatus === 'error') {
|
|
||||||
data.files[0].error = data.errorThrown ||
|
|
||||||
data.textStatus;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
add: function (e, data) {
|
|
||||||
if (e.isDefaultPrevented()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var scope = data.scope,
|
|
||||||
filesCopy = [];
|
|
||||||
angular.forEach(data.files, function (file) {
|
|
||||||
filesCopy.push(file);
|
|
||||||
});
|
|
||||||
scope.$parent.$applyAsync(function () {
|
|
||||||
addFileMethods(scope, data);
|
|
||||||
var method = scope.option('prependFiles') ?
|
|
||||||
'unshift' : 'push';
|
|
||||||
Array.prototype[method].apply(scope.queue, data.files);
|
|
||||||
});
|
|
||||||
data.process(function () {
|
|
||||||
return scope.process(data);
|
|
||||||
}).always(function () {
|
|
||||||
scope.$parent.$applyAsync(function () {
|
|
||||||
addFileMethods(scope, data);
|
|
||||||
scope.replace(filesCopy, data.files);
|
|
||||||
});
|
|
||||||
}).then(function () {
|
|
||||||
if ((scope.option('autoUpload') ||
|
|
||||||
data.autoUpload) &&
|
|
||||||
data.autoUpload !== false) {
|
|
||||||
data.submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
done: function (e, data) {
|
|
||||||
if (e.isDefaultPrevented()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var that = this;
|
|
||||||
data.scope.$apply(function () {
|
|
||||||
data.handleResponse.call(that, e, data);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: function (e, data) {
|
|
||||||
if (e.isDefaultPrevented()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var that = this,
|
|
||||||
scope = data.scope;
|
|
||||||
if (data.errorThrown === 'abort') {
|
|
||||||
scope.clear(data.files);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
scope.$apply(function () {
|
|
||||||
data.handleResponse.call(that, e, data);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
stop: scopeEvalAsync,
|
|
||||||
processstart: scopeEvalAsync,
|
|
||||||
processstop: scopeEvalAsync,
|
|
||||||
getNumberOfFiles: function () {
|
|
||||||
var scope = this.scope;
|
|
||||||
return scope.queue.length - scope.processing();
|
|
||||||
},
|
|
||||||
dataType: 'json',
|
|
||||||
autoUpload: false
|
|
||||||
};
|
|
||||||
this.$get = [
|
|
||||||
function () {
|
|
||||||
return {
|
|
||||||
defaults: $config
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
// Format byte numbers to readable presentations:
|
|
||||||
.provider('formatFileSizeFilter', function () {
|
|
||||||
var $config = {
|
|
||||||
// Byte units following the IEC format
|
|
||||||
// http://en.wikipedia.org/wiki/Kilobyte
|
|
||||||
units: [
|
|
||||||
{size: 1000000000, suffix: ' GB'},
|
|
||||||
{size: 1000000, suffix: ' MB'},
|
|
||||||
{size: 1000, suffix: ' KB'}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
this.defaults = $config;
|
|
||||||
this.$get = function () {
|
|
||||||
return function (bytes) {
|
|
||||||
if (!angular.isNumber(bytes)) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
var unit = true,
|
|
||||||
i = 0,
|
|
||||||
prefix,
|
|
||||||
suffix;
|
|
||||||
while (unit) {
|
|
||||||
unit = $config.units[i];
|
|
||||||
prefix = unit.prefix || '';
|
|
||||||
suffix = unit.suffix || '';
|
|
||||||
if (i === $config.units.length - 1 || bytes >= unit.size) {
|
|
||||||
return prefix + (bytes / unit.size).toFixed(2) + suffix;
|
|
||||||
}
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
// The FileUploadController initializes the fileupload widget and
|
|
||||||
// provides scope methods to control the File Upload functionality:
|
|
||||||
.controller('FileUploadController', [
|
|
||||||
'$scope', '$element', '$attrs', '$window', 'fileUpload','$q',
|
|
||||||
function ($scope, $element, $attrs, $window, fileUpload, $q) {
|
|
||||||
var uploadMethods = {
|
|
||||||
progress: function () {
|
|
||||||
return $element.fileupload('progress');
|
|
||||||
},
|
|
||||||
active: function () {
|
|
||||||
return $element.fileupload('active');
|
|
||||||
},
|
|
||||||
option: function (option, data) {
|
|
||||||
if (arguments.length === 1) {
|
|
||||||
return $element.fileupload('option', option);
|
|
||||||
}
|
|
||||||
$element.fileupload('option', option, data);
|
|
||||||
},
|
|
||||||
add: function (data) {
|
|
||||||
return $element.fileupload('add', data);
|
|
||||||
},
|
|
||||||
send: function (data) {
|
|
||||||
return $element.fileupload('send', data);
|
|
||||||
},
|
|
||||||
process: function (data) {
|
|
||||||
return $element.fileupload('process', data);
|
|
||||||
},
|
|
||||||
processing: function (data) {
|
|
||||||
return $element.fileupload('processing', data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$scope.disabled = !$window.jQuery.support.fileInput;
|
|
||||||
$scope.queue = $scope.queue || [];
|
|
||||||
$scope.clear = function (files) {
|
|
||||||
var queue = this.queue,
|
|
||||||
i = queue.length,
|
|
||||||
file = files,
|
|
||||||
length = 1;
|
|
||||||
if (angular.isArray(files)) {
|
|
||||||
file = files[0];
|
|
||||||
length = files.length;
|
|
||||||
}
|
|
||||||
while (i) {
|
|
||||||
i -= 1;
|
|
||||||
if (queue[i] === file) {
|
|
||||||
return queue.splice(i, length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$scope.replace = function (oldFiles, newFiles) {
|
|
||||||
var queue = this.queue,
|
|
||||||
file = oldFiles[0],
|
|
||||||
i,
|
|
||||||
j;
|
|
||||||
for (i = 0; i < queue.length; i += 1) {
|
|
||||||
if (queue[i] === file) {
|
|
||||||
for (j = 0; j < newFiles.length; j += 1) {
|
|
||||||
queue[i + j] = newFiles[j];
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$scope.applyOnQueue = function (method) {
|
|
||||||
var list = this.queue.slice(0),
|
|
||||||
i,
|
|
||||||
file,
|
|
||||||
promises = [];
|
|
||||||
for (i = 0; i < list.length; i += 1) {
|
|
||||||
file = list[i];
|
|
||||||
if (file[method]) {
|
|
||||||
promises.push(file[method]());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $q.all(promises);
|
|
||||||
};
|
|
||||||
$scope.submit = function () {
|
|
||||||
return this.applyOnQueue('$submit');
|
|
||||||
};
|
|
||||||
$scope.cancel = function () {
|
|
||||||
return this.applyOnQueue('$cancel');
|
|
||||||
};
|
|
||||||
// Add upload methods to the scope:
|
|
||||||
angular.extend($scope, uploadMethods);
|
|
||||||
// The fileupload widget will initialize with
|
|
||||||
// the options provided via "data-"-parameters,
|
|
||||||
// as well as those given via options object:
|
|
||||||
$element.fileupload(angular.extend(
|
|
||||||
{scope: $scope},
|
|
||||||
fileUpload.defaults
|
|
||||||
)).on('fileuploadadd', function (e, data) {
|
|
||||||
data.scope = $scope;
|
|
||||||
}).on('fileuploadfail', function (e, data) {
|
|
||||||
if (data.errorThrown === 'abort') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (data.dataType &&
|
|
||||||
data.dataType.indexOf('json') === data.dataType.length - 4) {
|
|
||||||
try {
|
|
||||||
data.result = angular.fromJson(data.jqXHR.responseText);
|
|
||||||
} catch (ignore) {}
|
|
||||||
}
|
|
||||||
}).on([
|
|
||||||
'fileuploadadd',
|
|
||||||
'fileuploadsubmit',
|
|
||||||
'fileuploadsend',
|
|
||||||
'fileuploaddone',
|
|
||||||
'fileuploadfail',
|
|
||||||
'fileuploadalways',
|
|
||||||
'fileuploadprogress',
|
|
||||||
'fileuploadprogressall',
|
|
||||||
'fileuploadstart',
|
|
||||||
'fileuploadstop',
|
|
||||||
'fileuploadchange',
|
|
||||||
'fileuploadpaste',
|
|
||||||
'fileuploaddrop',
|
|
||||||
'fileuploaddragover',
|
|
||||||
'fileuploadchunkbeforesend',
|
|
||||||
'fileuploadchunksend',
|
|
||||||
'fileuploadchunkdone',
|
|
||||||
'fileuploadchunkfail',
|
|
||||||
'fileuploadchunkalways',
|
|
||||||
'fileuploadprocessstart',
|
|
||||||
'fileuploadprocess',
|
|
||||||
'fileuploadprocessdone',
|
|
||||||
'fileuploadprocessfail',
|
|
||||||
'fileuploadprocessalways',
|
|
||||||
'fileuploadprocessstop'
|
|
||||||
].join(' '), function (e, data) {
|
|
||||||
$scope.$parent.$applyAsync(function () {
|
|
||||||
if ($scope.$emit(e.type, data).defaultPrevented) {
|
|
||||||
e.preventDefault();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).on('remove', function () {
|
|
||||||
// Remove upload methods from the scope,
|
|
||||||
// when the widget is removed:
|
|
||||||
var method;
|
|
||||||
for (method in uploadMethods) {
|
|
||||||
if (uploadMethods.hasOwnProperty(method)) {
|
|
||||||
delete $scope[method];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// Observe option changes:
|
|
||||||
$scope.$watch(
|
|
||||||
$attrs.fileUpload,
|
|
||||||
function (newOptions) {
|
|
||||||
if (newOptions) {
|
|
||||||
$element.fileupload('option', newOptions);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
// Provide File Upload progress feedback:
|
|
||||||
.controller('FileUploadProgressController', [
|
|
||||||
'$scope', '$attrs', '$parse',
|
|
||||||
function ($scope, $attrs, $parse) {
|
|
||||||
var fn = $parse($attrs.fileUploadProgress),
|
|
||||||
update = function () {
|
|
||||||
var progress = fn($scope);
|
|
||||||
if (!progress || !progress.total) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.num = Math.floor(
|
|
||||||
progress.loaded / progress.total * 100
|
|
||||||
);
|
|
||||||
};
|
|
||||||
update();
|
|
||||||
$scope.$watch(
|
|
||||||
$attrs.fileUploadProgress + '.loaded',
|
|
||||||
function (newValue, oldValue) {
|
|
||||||
if (newValue !== oldValue) {
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
// Display File Upload previews:
|
|
||||||
.controller('FileUploadPreviewController', [
|
|
||||||
'$scope', '$element', '$attrs',
|
|
||||||
function ($scope, $element, $attrs) {
|
|
||||||
$scope.$watch(
|
|
||||||
$attrs.fileUploadPreview + '.preview',
|
|
||||||
function (preview) {
|
|
||||||
$element.empty();
|
|
||||||
if (preview) {
|
|
||||||
$element.append(preview);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
.directive('fileUpload', function () {
|
|
||||||
return {
|
|
||||||
controller: 'FileUploadController',
|
|
||||||
scope: true
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
.directive('fileUploadProgress', function () {
|
|
||||||
return {
|
|
||||||
controller: 'FileUploadProgressController',
|
|
||||||
scope: true
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
.directive('fileUploadPreview', function () {
|
|
||||||
return {
|
|
||||||
controller: 'FileUploadPreviewController'
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
// Enhance the HTML5 download attribute to
|
|
||||||
// allow drag&drop of files to the desktop:
|
|
||||||
.directive('download', function () {
|
|
||||||
return function (scope, elm) {
|
|
||||||
elm.on('dragstart', function (e) {
|
|
||||||
try {
|
|
||||||
e.originalEvent.dataTransfer.setData(
|
|
||||||
'DownloadURL',
|
|
||||||
[
|
|
||||||
'application/octet-stream',
|
|
||||||
elm.prop('download'),
|
|
||||||
elm.prop('href')
|
|
||||||
].join(':')
|
|
||||||
);
|
|
||||||
} catch (ignore) {}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
}));
|
|
|
@ -9,105 +9,93 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* jshint nomen:false */
|
/* global define, require */
|
||||||
/* global define, require, window, document */
|
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define([
|
define(['jquery', 'load-image', './jquery.fileupload-process'], factory);
|
||||||
'jquery',
|
} else if (typeof exports === 'object') {
|
||||||
'load-image',
|
// Node/CommonJS:
|
||||||
'./jquery.fileupload-process'
|
factory(
|
||||||
], factory);
|
require('jquery'),
|
||||||
} else if (typeof exports === 'object') {
|
require('blueimp-load-image/js/load-image'),
|
||||||
// Node/CommonJS:
|
require('./jquery.fileupload-process')
|
||||||
factory(
|
|
||||||
require('jquery'),
|
|
||||||
require('blueimp-load-image/js/load-image'),
|
|
||||||
require('./jquery.fileupload-process')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Browser globals:
|
|
||||||
factory(
|
|
||||||
window.jQuery,
|
|
||||||
window.loadImage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(function ($, loadImage) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Prepend to the default processQueue:
|
|
||||||
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
|
||||||
{
|
|
||||||
action: 'loadAudio',
|
|
||||||
// Use the action as prefix for the "@" options:
|
|
||||||
prefix: true,
|
|
||||||
fileTypes: '@',
|
|
||||||
maxFileSize: '@',
|
|
||||||
disabled: '@disableAudioPreview'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'setAudio',
|
|
||||||
name: '@audioPreviewName',
|
|
||||||
disabled: '@disableAudioPreview'
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.jQuery, window.loadImage);
|
||||||
|
}
|
||||||
|
})(function ($, loadImage) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// The File Upload Audio Preview plugin extends the fileupload widget
|
// Prepend to the default processQueue:
|
||||||
// with audio preview functionality:
|
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
{
|
||||||
|
action: 'loadAudio',
|
||||||
|
// Use the action as prefix for the "@" options:
|
||||||
|
prefix: true,
|
||||||
|
fileTypes: '@',
|
||||||
|
maxFileSize: '@',
|
||||||
|
disabled: '@disableAudioPreview'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'setAudio',
|
||||||
|
name: '@audioPreviewName',
|
||||||
|
disabled: '@disableAudioPreview'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
options: {
|
// The File Upload Audio Preview plugin extends the fileupload widget
|
||||||
// The regular expression for the types of audio files to load,
|
// with audio preview functionality:
|
||||||
// matched against the file type:
|
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
||||||
loadAudioFileTypes: /^audio\/.*$/
|
options: {
|
||||||
},
|
// The regular expression for the types of audio files to load,
|
||||||
|
// matched against the file type:
|
||||||
|
loadAudioFileTypes: /^audio\/.*$/
|
||||||
|
},
|
||||||
|
|
||||||
_audioElement: document.createElement('audio'),
|
_audioElement: document.createElement('audio'),
|
||||||
|
|
||||||
processActions: {
|
|
||||||
|
|
||||||
// Loads the audio file given via data.files and data.index
|
|
||||||
// as audio element if the browser supports playing it.
|
|
||||||
// Accepts the options fileTypes (regular expression)
|
|
||||||
// and maxFileSize (integer) to limit the files to load:
|
|
||||||
loadAudio: function (data, options) {
|
|
||||||
if (options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var file = data.files[data.index],
|
|
||||||
url,
|
|
||||||
audio;
|
|
||||||
if (this._audioElement.canPlayType &&
|
|
||||||
this._audioElement.canPlayType(file.type) &&
|
|
||||||
($.type(options.maxFileSize) !== 'number' ||
|
|
||||||
file.size <= options.maxFileSize) &&
|
|
||||||
(!options.fileTypes ||
|
|
||||||
options.fileTypes.test(file.type))) {
|
|
||||||
url = loadImage.createObjectURL(file);
|
|
||||||
if (url) {
|
|
||||||
audio = this._audioElement.cloneNode(false);
|
|
||||||
audio.src = url;
|
|
||||||
audio.controls = true;
|
|
||||||
data.audio = audio;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Sets the audio element as a property of the file object:
|
|
||||||
setAudio: function (data, options) {
|
|
||||||
if (data.audio && !options.disabled) {
|
|
||||||
data.files[data.index][options.name || 'preview'] = data.audio;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
processActions: {
|
||||||
|
// Loads the audio file given via data.files and data.index
|
||||||
|
// as audio element if the browser supports playing it.
|
||||||
|
// Accepts the options fileTypes (regular expression)
|
||||||
|
// and maxFileSize (integer) to limit the files to load:
|
||||||
|
loadAudio: function (data, options) {
|
||||||
|
if (options.disabled) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
var file = data.files[data.index],
|
||||||
|
url,
|
||||||
|
audio;
|
||||||
|
if (
|
||||||
|
this._audioElement.canPlayType &&
|
||||||
|
this._audioElement.canPlayType(file.type) &&
|
||||||
|
($.type(options.maxFileSize) !== 'number' ||
|
||||||
|
file.size <= options.maxFileSize) &&
|
||||||
|
(!options.fileTypes || options.fileTypes.test(file.type))
|
||||||
|
) {
|
||||||
|
url = loadImage.createObjectURL(file);
|
||||||
|
if (url) {
|
||||||
|
audio = this._audioElement.cloneNode(false);
|
||||||
|
audio.src = url;
|
||||||
|
audio.controls = true;
|
||||||
|
data.audio = audio;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
});
|
// Sets the audio element as a property of the file object:
|
||||||
|
setAudio: function (data, options) {
|
||||||
}));
|
if (data.audio && !options.disabled) {
|
||||||
|
data.files[data.index][options.name || 'preview'] = data.audio;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -9,318 +9,338 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* jshint nomen:false */
|
/* global define, require */
|
||||||
/* global define, require, window, Blob */
|
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define([
|
define([
|
||||||
'jquery',
|
'jquery',
|
||||||
'load-image',
|
'load-image',
|
||||||
'load-image-meta',
|
'load-image-meta',
|
||||||
'load-image-scale',
|
'load-image-scale',
|
||||||
'load-image-exif',
|
'load-image-exif',
|
||||||
'canvas-to-blob',
|
'load-image-orientation',
|
||||||
'./jquery.fileupload-process'
|
'canvas-to-blob',
|
||||||
], factory);
|
'./jquery.fileupload-process'
|
||||||
} else if (typeof exports === 'object') {
|
], factory);
|
||||||
// Node/CommonJS:
|
} else if (typeof exports === 'object') {
|
||||||
factory(
|
// Node/CommonJS:
|
||||||
require('jquery'),
|
factory(
|
||||||
require('blueimp-load-image/js/load-image'),
|
require('jquery'),
|
||||||
require('blueimp-load-image/js/load-image-meta'),
|
require('blueimp-load-image/js/load-image'),
|
||||||
require('blueimp-load-image/js/load-image-scale'),
|
require('blueimp-load-image/js/load-image-meta'),
|
||||||
require('blueimp-load-image/js/load-image-exif'),
|
require('blueimp-load-image/js/load-image-scale'),
|
||||||
require('blueimp-canvas-to-blob'),
|
require('blueimp-load-image/js/load-image-exif'),
|
||||||
require('./jquery.fileupload-process')
|
require('blueimp-load-image/js/load-image-orientation'),
|
||||||
);
|
require('blueimp-canvas-to-blob'),
|
||||||
} else {
|
require('./jquery.fileupload-process')
|
||||||
// Browser globals:
|
|
||||||
factory(
|
|
||||||
window.jQuery,
|
|
||||||
window.loadImage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(function ($, loadImage) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Prepend to the default processQueue:
|
|
||||||
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
|
||||||
{
|
|
||||||
action: 'loadImageMetaData',
|
|
||||||
disableImageHead: '@',
|
|
||||||
disableExif: '@',
|
|
||||||
disableExifThumbnail: '@',
|
|
||||||
disableExifSub: '@',
|
|
||||||
disableExifGps: '@',
|
|
||||||
disabled: '@disableImageMetaDataLoad'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'loadImage',
|
|
||||||
// Use the action as prefix for the "@" options:
|
|
||||||
prefix: true,
|
|
||||||
fileTypes: '@',
|
|
||||||
maxFileSize: '@',
|
|
||||||
noRevoke: '@',
|
|
||||||
disabled: '@disableImageLoad'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'resizeImage',
|
|
||||||
// Use "image" as prefix for the "@" options:
|
|
||||||
prefix: 'image',
|
|
||||||
maxWidth: '@',
|
|
||||||
maxHeight: '@',
|
|
||||||
minWidth: '@',
|
|
||||||
minHeight: '@',
|
|
||||||
crop: '@',
|
|
||||||
orientation: '@',
|
|
||||||
forceResize: '@',
|
|
||||||
disabled: '@disableImageResize'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'saveImage',
|
|
||||||
quality: '@imageQuality',
|
|
||||||
type: '@imageType',
|
|
||||||
disabled: '@disableImageResize'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'saveImageMetaData',
|
|
||||||
disabled: '@disableImageMetaDataSave'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'resizeImage',
|
|
||||||
// Use "preview" as prefix for the "@" options:
|
|
||||||
prefix: 'preview',
|
|
||||||
maxWidth: '@',
|
|
||||||
maxHeight: '@',
|
|
||||||
minWidth: '@',
|
|
||||||
minHeight: '@',
|
|
||||||
crop: '@',
|
|
||||||
orientation: '@',
|
|
||||||
thumbnail: '@',
|
|
||||||
canvas: '@',
|
|
||||||
disabled: '@disableImagePreview'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'setImage',
|
|
||||||
name: '@imagePreviewName',
|
|
||||||
disabled: '@disableImagePreview'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'deleteImageReferences',
|
|
||||||
disabled: '@disableImageReferencesDeletion'
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.jQuery, window.loadImage);
|
||||||
|
}
|
||||||
|
})(function ($, loadImage) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// The File Upload Resize plugin extends the fileupload widget
|
// Prepend to the default processQueue:
|
||||||
// with image resize functionality:
|
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
{
|
||||||
|
action: 'loadImageMetaData',
|
||||||
|
maxMetaDataSize: '@',
|
||||||
|
disableImageHead: '@',
|
||||||
|
disableMetaDataParsers: '@',
|
||||||
|
disableExif: '@',
|
||||||
|
disableExifOffsets: '@',
|
||||||
|
includeExifTags: '@',
|
||||||
|
excludeExifTags: '@',
|
||||||
|
disableIptc: '@',
|
||||||
|
disableIptcOffsets: '@',
|
||||||
|
includeIptcTags: '@',
|
||||||
|
excludeIptcTags: '@',
|
||||||
|
disabled: '@disableImageMetaDataLoad'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'loadImage',
|
||||||
|
// Use the action as prefix for the "@" options:
|
||||||
|
prefix: true,
|
||||||
|
fileTypes: '@',
|
||||||
|
maxFileSize: '@',
|
||||||
|
noRevoke: '@',
|
||||||
|
disabled: '@disableImageLoad'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'resizeImage',
|
||||||
|
// Use "image" as prefix for the "@" options:
|
||||||
|
prefix: 'image',
|
||||||
|
maxWidth: '@',
|
||||||
|
maxHeight: '@',
|
||||||
|
minWidth: '@',
|
||||||
|
minHeight: '@',
|
||||||
|
crop: '@',
|
||||||
|
orientation: '@',
|
||||||
|
forceResize: '@',
|
||||||
|
disabled: '@disableImageResize'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'saveImage',
|
||||||
|
quality: '@imageQuality',
|
||||||
|
type: '@imageType',
|
||||||
|
disabled: '@disableImageResize'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'saveImageMetaData',
|
||||||
|
disabled: '@disableImageMetaDataSave'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'resizeImage',
|
||||||
|
// Use "preview" as prefix for the "@" options:
|
||||||
|
prefix: 'preview',
|
||||||
|
maxWidth: '@',
|
||||||
|
maxHeight: '@',
|
||||||
|
minWidth: '@',
|
||||||
|
minHeight: '@',
|
||||||
|
crop: '@',
|
||||||
|
orientation: '@',
|
||||||
|
thumbnail: '@',
|
||||||
|
canvas: '@',
|
||||||
|
disabled: '@disableImagePreview'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'setImage',
|
||||||
|
name: '@imagePreviewName',
|
||||||
|
disabled: '@disableImagePreview'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'deleteImageReferences',
|
||||||
|
disabled: '@disableImageReferencesDeletion'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
options: {
|
// The File Upload Resize plugin extends the fileupload widget
|
||||||
// The regular expression for the types of images to load:
|
// with image resize functionality:
|
||||||
// matched against the file type:
|
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
||||||
loadImageFileTypes: /^image\/(gif|jpeg|png|svg\+xml)$/,
|
options: {
|
||||||
// The maximum file size of images to load:
|
// The regular expression for the types of images to load:
|
||||||
loadImageMaxFileSize: 10000000, // 10MB
|
// matched against the file type:
|
||||||
// The maximum width of resized images:
|
loadImageFileTypes: /^image\/(gif|jpeg|png|svg\+xml)$/,
|
||||||
imageMaxWidth: 1920,
|
// The maximum file size of images to load:
|
||||||
// The maximum height of resized images:
|
loadImageMaxFileSize: 10000000, // 10MB
|
||||||
imageMaxHeight: 1080,
|
// The maximum width of resized images:
|
||||||
// Defines the image orientation (1-8) or takes the orientation
|
imageMaxWidth: 1920,
|
||||||
// value from Exif data if set to true:
|
// The maximum height of resized images:
|
||||||
imageOrientation: false,
|
imageMaxHeight: 1080,
|
||||||
// Define if resized images should be cropped or only scaled:
|
// Defines the image orientation (1-8) or takes the orientation
|
||||||
imageCrop: false,
|
// value from Exif data if set to true:
|
||||||
// Disable the resize image functionality by default:
|
imageOrientation: true,
|
||||||
disableImageResize: true,
|
// Define if resized images should be cropped or only scaled:
|
||||||
// The maximum width of the preview images:
|
imageCrop: false,
|
||||||
previewMaxWidth: 80,
|
// Disable the resize image functionality by default:
|
||||||
// The maximum height of the preview images:
|
disableImageResize: true,
|
||||||
previewMaxHeight: 80,
|
// The maximum width of the preview images:
|
||||||
// Defines the preview orientation (1-8) or takes the orientation
|
previewMaxWidth: 80,
|
||||||
// value from Exif data if set to true:
|
// The maximum height of the preview images:
|
||||||
previewOrientation: true,
|
previewMaxHeight: 80,
|
||||||
// Create the preview using the Exif data thumbnail:
|
// Defines the preview orientation (1-8) or takes the orientation
|
||||||
previewThumbnail: true,
|
// value from Exif data if set to true:
|
||||||
// Define if preview images should be cropped or only scaled:
|
previewOrientation: true,
|
||||||
previewCrop: false,
|
// Create the preview using the Exif data thumbnail:
|
||||||
// Define if preview images should be resized as canvas elements:
|
previewThumbnail: true,
|
||||||
previewCanvas: true
|
// Define if preview images should be cropped or only scaled:
|
||||||
},
|
previewCrop: false,
|
||||||
|
// Define if preview images should be resized as canvas elements:
|
||||||
processActions: {
|
previewCanvas: true
|
||||||
|
},
|
||||||
// Loads the image given via data.files and data.index
|
|
||||||
// as img element, if the browser supports the File API.
|
|
||||||
// Accepts the options fileTypes (regular expression)
|
|
||||||
// and maxFileSize (integer) to limit the files to load:
|
|
||||||
loadImage: function (data, options) {
|
|
||||||
if (options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var that = this,
|
|
||||||
file = data.files[data.index],
|
|
||||||
dfd = $.Deferred();
|
|
||||||
if (($.type(options.maxFileSize) === 'number' &&
|
|
||||||
file.size > options.maxFileSize) ||
|
|
||||||
(options.fileTypes &&
|
|
||||||
!options.fileTypes.test(file.type)) ||
|
|
||||||
!loadImage(
|
|
||||||
file,
|
|
||||||
function (img) {
|
|
||||||
if (img.src) {
|
|
||||||
data.img = img;
|
|
||||||
}
|
|
||||||
dfd.resolveWith(that, [data]);
|
|
||||||
},
|
|
||||||
options
|
|
||||||
)) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return dfd.promise();
|
|
||||||
},
|
|
||||||
|
|
||||||
// Resizes the image given as data.canvas or data.img
|
|
||||||
// and updates data.canvas or data.img with the resized image.
|
|
||||||
// Also stores the resized image as preview property.
|
|
||||||
// Accepts the options maxWidth, maxHeight, minWidth,
|
|
||||||
// minHeight, canvas and crop:
|
|
||||||
resizeImage: function (data, options) {
|
|
||||||
if (options.disabled || !(data.canvas || data.img)) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
options = $.extend({canvas: true}, options);
|
|
||||||
var that = this,
|
|
||||||
dfd = $.Deferred(),
|
|
||||||
img = (options.canvas && data.canvas) || data.img,
|
|
||||||
resolve = function (newImg) {
|
|
||||||
if (newImg && (newImg.width !== img.width ||
|
|
||||||
newImg.height !== img.height ||
|
|
||||||
options.forceResize)) {
|
|
||||||
data[newImg.getContext ? 'canvas' : 'img'] = newImg;
|
|
||||||
}
|
|
||||||
data.preview = newImg;
|
|
||||||
dfd.resolveWith(that, [data]);
|
|
||||||
},
|
|
||||||
thumbnail;
|
|
||||||
if (data.exif) {
|
|
||||||
if (options.orientation === true) {
|
|
||||||
options.orientation = data.exif.get('Orientation');
|
|
||||||
}
|
|
||||||
if (options.thumbnail) {
|
|
||||||
thumbnail = data.exif.get('Thumbnail');
|
|
||||||
if (thumbnail) {
|
|
||||||
loadImage(thumbnail, resolve, options);
|
|
||||||
return dfd.promise();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Prevent orienting the same image twice:
|
|
||||||
if (data.orientation) {
|
|
||||||
delete options.orientation;
|
|
||||||
} else {
|
|
||||||
data.orientation = options.orientation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (img) {
|
|
||||||
resolve(loadImage.scale(img, options));
|
|
||||||
return dfd.promise();
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Saves the processed image given as data.canvas
|
|
||||||
// inplace at data.index of data.files:
|
|
||||||
saveImage: function (data, options) {
|
|
||||||
if (!data.canvas || options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var that = this,
|
|
||||||
file = data.files[data.index],
|
|
||||||
dfd = $.Deferred();
|
|
||||||
if (data.canvas.toBlob) {
|
|
||||||
data.canvas.toBlob(
|
|
||||||
function (blob) {
|
|
||||||
if (!blob.name) {
|
|
||||||
if (file.type === blob.type) {
|
|
||||||
blob.name = file.name;
|
|
||||||
} else if (file.name) {
|
|
||||||
blob.name = file.name.replace(
|
|
||||||
/\.\w+$/,
|
|
||||||
'.' + blob.type.substr(6)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Don't restore invalid meta data:
|
|
||||||
if (file.type !== blob.type) {
|
|
||||||
delete data.imageHead;
|
|
||||||
}
|
|
||||||
// Store the created blob at the position
|
|
||||||
// of the original file in the files list:
|
|
||||||
data.files[data.index] = blob;
|
|
||||||
dfd.resolveWith(that, [data]);
|
|
||||||
},
|
|
||||||
options.type || file.type,
|
|
||||||
options.quality
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return dfd.promise();
|
|
||||||
},
|
|
||||||
|
|
||||||
loadImageMetaData: function (data, options) {
|
|
||||||
if (options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var that = this,
|
|
||||||
dfd = $.Deferred();
|
|
||||||
loadImage.parseMetaData(data.files[data.index], function (result) {
|
|
||||||
$.extend(data, result);
|
|
||||||
dfd.resolveWith(that, [data]);
|
|
||||||
}, options);
|
|
||||||
return dfd.promise();
|
|
||||||
},
|
|
||||||
|
|
||||||
saveImageMetaData: function (data, options) {
|
|
||||||
if (!(data.imageHead && data.canvas &&
|
|
||||||
data.canvas.toBlob && !options.disabled)) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var file = data.files[data.index],
|
|
||||||
blob = new Blob([
|
|
||||||
data.imageHead,
|
|
||||||
// Resized images always have a head size of 20 bytes,
|
|
||||||
// including the JPEG marker and a minimal JFIF header:
|
|
||||||
this._blobSlice.call(file, 20)
|
|
||||||
], {type: file.type});
|
|
||||||
blob.name = file.name;
|
|
||||||
data.files[data.index] = blob;
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Sets the resized version of the image as a property of the
|
|
||||||
// file object, must be called after "saveImage":
|
|
||||||
setImage: function (data, options) {
|
|
||||||
if (data.preview && !options.disabled) {
|
|
||||||
data.files[data.index][options.name || 'preview'] = data.preview;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteImageReferences: function (data, options) {
|
|
||||||
if (!options.disabled) {
|
|
||||||
delete data.img;
|
|
||||||
delete data.canvas;
|
|
||||||
delete data.preview;
|
|
||||||
delete data.imageHead;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
processActions: {
|
||||||
|
// Loads the image given via data.files and data.index
|
||||||
|
// as img element, if the browser supports the File API.
|
||||||
|
// Accepts the options fileTypes (regular expression)
|
||||||
|
// and maxFileSize (integer) to limit the files to load:
|
||||||
|
loadImage: function (data, options) {
|
||||||
|
if (options.disabled) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
var that = this,
|
||||||
|
file = data.files[data.index],
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
dfd = $.Deferred();
|
||||||
|
if (
|
||||||
|
($.type(options.maxFileSize) === 'number' &&
|
||||||
|
file.size > options.maxFileSize) ||
|
||||||
|
(options.fileTypes && !options.fileTypes.test(file.type)) ||
|
||||||
|
!loadImage(
|
||||||
|
file,
|
||||||
|
function (img) {
|
||||||
|
if (img.src) {
|
||||||
|
data.img = img;
|
||||||
|
}
|
||||||
|
dfd.resolveWith(that, [data]);
|
||||||
|
},
|
||||||
|
options
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
return dfd.promise();
|
||||||
|
},
|
||||||
|
|
||||||
});
|
// Resizes the image given as data.canvas or data.img
|
||||||
|
// and updates data.canvas or data.img with the resized image.
|
||||||
|
// Also stores the resized image as preview property.
|
||||||
|
// Accepts the options maxWidth, maxHeight, minWidth,
|
||||||
|
// minHeight, canvas and crop:
|
||||||
|
resizeImage: function (data, options) {
|
||||||
|
if (options.disabled || !(data.canvas || data.img)) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
options = $.extend({ canvas: true }, options);
|
||||||
|
var that = this,
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
dfd = $.Deferred(),
|
||||||
|
img = (options.canvas && data.canvas) || data.img,
|
||||||
|
resolve = function (newImg) {
|
||||||
|
if (
|
||||||
|
newImg &&
|
||||||
|
(newImg.width !== img.width ||
|
||||||
|
newImg.height !== img.height ||
|
||||||
|
options.forceResize)
|
||||||
|
) {
|
||||||
|
data[newImg.getContext ? 'canvas' : 'img'] = newImg;
|
||||||
|
}
|
||||||
|
data.preview = newImg;
|
||||||
|
dfd.resolveWith(that, [data]);
|
||||||
|
},
|
||||||
|
thumbnail,
|
||||||
|
thumbnailBlob;
|
||||||
|
if (data.exif && options.thumbnail) {
|
||||||
|
thumbnail = data.exif.get('Thumbnail');
|
||||||
|
thumbnailBlob = thumbnail && thumbnail.get('Blob');
|
||||||
|
if (thumbnailBlob) {
|
||||||
|
options.orientation = data.exif.get('Orientation');
|
||||||
|
loadImage(thumbnailBlob, resolve, options);
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.orientation) {
|
||||||
|
// Prevent orienting the same image twice:
|
||||||
|
delete options.orientation;
|
||||||
|
} else {
|
||||||
|
data.orientation = options.orientation || loadImage.orientation;
|
||||||
|
}
|
||||||
|
if (img) {
|
||||||
|
resolve(loadImage.scale(img, options, data));
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
}));
|
// Saves the processed image given as data.canvas
|
||||||
|
// inplace at data.index of data.files:
|
||||||
|
saveImage: function (data, options) {
|
||||||
|
if (!data.canvas || options.disabled) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
var that = this,
|
||||||
|
file = data.files[data.index],
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
dfd = $.Deferred();
|
||||||
|
if (data.canvas.toBlob) {
|
||||||
|
data.canvas.toBlob(
|
||||||
|
function (blob) {
|
||||||
|
if (!blob.name) {
|
||||||
|
if (file.type === blob.type) {
|
||||||
|
blob.name = file.name;
|
||||||
|
} else if (file.name) {
|
||||||
|
blob.name = file.name.replace(
|
||||||
|
/\.\w+$/,
|
||||||
|
'.' + blob.type.substr(6)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Don't restore invalid meta data:
|
||||||
|
if (file.type !== blob.type) {
|
||||||
|
delete data.imageHead;
|
||||||
|
}
|
||||||
|
// Store the created blob at the position
|
||||||
|
// of the original file in the files list:
|
||||||
|
data.files[data.index] = blob;
|
||||||
|
dfd.resolveWith(that, [data]);
|
||||||
|
},
|
||||||
|
options.type || file.type,
|
||||||
|
options.quality
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
return dfd.promise();
|
||||||
|
},
|
||||||
|
|
||||||
|
loadImageMetaData: function (data, options) {
|
||||||
|
if (options.disabled) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
var that = this,
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
dfd = $.Deferred();
|
||||||
|
loadImage.parseMetaData(
|
||||||
|
data.files[data.index],
|
||||||
|
function (result) {
|
||||||
|
$.extend(data, result);
|
||||||
|
dfd.resolveWith(that, [data]);
|
||||||
|
},
|
||||||
|
options
|
||||||
|
);
|
||||||
|
return dfd.promise();
|
||||||
|
},
|
||||||
|
|
||||||
|
saveImageMetaData: function (data, options) {
|
||||||
|
if (
|
||||||
|
!(
|
||||||
|
data.imageHead &&
|
||||||
|
data.canvas &&
|
||||||
|
data.canvas.toBlob &&
|
||||||
|
!options.disabled
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
var that = this,
|
||||||
|
file = data.files[data.index],
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
dfd = $.Deferred();
|
||||||
|
if (data.orientation === true && data.exifOffsets) {
|
||||||
|
// Reset Exif Orientation data:
|
||||||
|
loadImage.writeExifData(data.imageHead, data, 'Orientation', 1);
|
||||||
|
}
|
||||||
|
loadImage.replaceHead(file, data.imageHead, function (blob) {
|
||||||
|
blob.name = file.name;
|
||||||
|
data.files[data.index] = blob;
|
||||||
|
dfd.resolveWith(that, [data]);
|
||||||
|
});
|
||||||
|
return dfd.promise();
|
||||||
|
},
|
||||||
|
|
||||||
|
// Sets the resized version of the image as a property of the
|
||||||
|
// file object, must be called after "saveImage":
|
||||||
|
setImage: function (data, options) {
|
||||||
|
if (data.preview && !options.disabled) {
|
||||||
|
data.files[data.index][options.name || 'preview'] = data.preview;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteImageReferences: function (data, options) {
|
||||||
|
if (!options.disabled) {
|
||||||
|
delete data.img;
|
||||||
|
delete data.canvas;
|
||||||
|
delete data.preview;
|
||||||
|
delete data.imageHead;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -1,161 +0,0 @@
|
||||||
/*
|
|
||||||
* jQuery File Upload jQuery UI Plugin
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2013, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* jshint nomen:false */
|
|
||||||
/* global define, require, window */
|
|
||||||
|
|
||||||
;(function (factory) {
|
|
||||||
'use strict';
|
|
||||||
if (typeof define === 'function' && define.amd) {
|
|
||||||
// Register as an anonymous AMD module:
|
|
||||||
define([
|
|
||||||
'jquery',
|
|
||||||
'./jquery.fileupload-ui'
|
|
||||||
], factory);
|
|
||||||
} else if (typeof exports === 'object') {
|
|
||||||
// Node/CommonJS:
|
|
||||||
factory(
|
|
||||||
require('jquery'),
|
|
||||||
require('./jquery.fileupload-ui')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Browser globals:
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
|
||||||
|
|
||||||
options: {
|
|
||||||
processdone: function (e, data) {
|
|
||||||
data.context.find('.start').button('enable');
|
|
||||||
},
|
|
||||||
progress: function (e, data) {
|
|
||||||
if (data.context) {
|
|
||||||
data.context.find('.progress').progressbar(
|
|
||||||
'option',
|
|
||||||
'value',
|
|
||||||
parseInt(data.loaded / data.total * 100, 10)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
progressall: function (e, data) {
|
|
||||||
var $this = $(this);
|
|
||||||
$this.find('.fileupload-progress')
|
|
||||||
.find('.progress').progressbar(
|
|
||||||
'option',
|
|
||||||
'value',
|
|
||||||
parseInt(data.loaded / data.total * 100, 10)
|
|
||||||
).end()
|
|
||||||
.find('.progress-extended').each(function () {
|
|
||||||
$(this).html(
|
|
||||||
($this.data('blueimp-fileupload') ||
|
|
||||||
$this.data('fileupload'))
|
|
||||||
._renderExtendedProgress(data)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_renderUpload: function (func, files) {
|
|
||||||
var node = this._super(func, files),
|
|
||||||
showIconText = $(window).width() > 480;
|
|
||||||
node.find('.progress').empty().progressbar();
|
|
||||||
node.find('.start').button({
|
|
||||||
icons: {primary: 'ui-icon-circle-arrow-e'},
|
|
||||||
text: showIconText
|
|
||||||
});
|
|
||||||
node.find('.cancel').button({
|
|
||||||
icons: {primary: 'ui-icon-cancel'},
|
|
||||||
text: showIconText
|
|
||||||
});
|
|
||||||
if (node.hasClass('fade')) {
|
|
||||||
node.hide();
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
},
|
|
||||||
|
|
||||||
_renderDownload: function (func, files) {
|
|
||||||
var node = this._super(func, files),
|
|
||||||
showIconText = $(window).width() > 480;
|
|
||||||
node.find('.delete').button({
|
|
||||||
icons: {primary: 'ui-icon-trash'},
|
|
||||||
text: showIconText
|
|
||||||
});
|
|
||||||
if (node.hasClass('fade')) {
|
|
||||||
node.hide();
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
},
|
|
||||||
|
|
||||||
_startHandler: function (e) {
|
|
||||||
$(e.currentTarget).button('disable');
|
|
||||||
this._super(e);
|
|
||||||
},
|
|
||||||
|
|
||||||
_transition: function (node) {
|
|
||||||
var deferred = $.Deferred();
|
|
||||||
if (node.hasClass('fade')) {
|
|
||||||
node.fadeToggle(
|
|
||||||
this.options.transitionDuration,
|
|
||||||
this.options.transitionEasing,
|
|
||||||
function () {
|
|
||||||
deferred.resolveWith(node);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
deferred.resolveWith(node);
|
|
||||||
}
|
|
||||||
return deferred;
|
|
||||||
},
|
|
||||||
|
|
||||||
_create: function () {
|
|
||||||
this._super();
|
|
||||||
this.element
|
|
||||||
.find('.fileupload-buttonbar')
|
|
||||||
.find('.fileinput-button').each(function () {
|
|
||||||
var input = $(this).find('input:file').detach();
|
|
||||||
$(this)
|
|
||||||
.button({icons: {primary: 'ui-icon-plusthick'}})
|
|
||||||
.append(input);
|
|
||||||
})
|
|
||||||
.end().find('.start')
|
|
||||||
.button({icons: {primary: 'ui-icon-circle-arrow-e'}})
|
|
||||||
.end().find('.cancel')
|
|
||||||
.button({icons: {primary: 'ui-icon-cancel'}})
|
|
||||||
.end().find('.delete')
|
|
||||||
.button({icons: {primary: 'ui-icon-trash'}})
|
|
||||||
.end().find('.progress').progressbar();
|
|
||||||
},
|
|
||||||
|
|
||||||
_destroy: function () {
|
|
||||||
this.element
|
|
||||||
.find('.fileupload-buttonbar')
|
|
||||||
.find('.fileinput-button').each(function () {
|
|
||||||
var input = $(this).find('input:file').detach();
|
|
||||||
$(this)
|
|
||||||
.button('destroy')
|
|
||||||
.append(input);
|
|
||||||
})
|
|
||||||
.end().find('.start')
|
|
||||||
.button('destroy')
|
|
||||||
.end().find('.cancel')
|
|
||||||
.button('destroy')
|
|
||||||
.end().find('.delete')
|
|
||||||
.button('destroy')
|
|
||||||
.end().find('.progress').progressbar('destroy');
|
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
}));
|
|
|
@ -9,170 +9,162 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* jshint nomen:false */
|
/* global define, require */
|
||||||
/* global define, require, window */
|
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define([
|
define(['jquery', './jquery.fileupload'], factory);
|
||||||
'jquery',
|
} else if (typeof exports === 'object') {
|
||||||
'./jquery.fileupload'
|
// Node/CommonJS:
|
||||||
], factory);
|
factory(require('jquery'), require('./jquery.fileupload'));
|
||||||
} else if (typeof exports === 'object') {
|
} else {
|
||||||
// Node/CommonJS:
|
// Browser globals:
|
||||||
factory(
|
factory(window.jQuery);
|
||||||
require('jquery'),
|
}
|
||||||
require('./jquery.fileupload')
|
})(function ($) {
|
||||||
);
|
'use strict';
|
||||||
} else {
|
|
||||||
// Browser globals:
|
|
||||||
factory(
|
|
||||||
window.jQuery
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var originalAdd = $.blueimp.fileupload.prototype.options.add;
|
var originalAdd = $.blueimp.fileupload.prototype.options.add;
|
||||||
|
|
||||||
// The File Upload Processing plugin extends the fileupload widget
|
// The File Upload Processing plugin extends the fileupload widget
|
||||||
// with file processing functionality:
|
// with file processing functionality:
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
||||||
|
options: {
|
||||||
options: {
|
// The list of processing actions:
|
||||||
// The list of processing actions:
|
processQueue: [
|
||||||
processQueue: [
|
/*
|
||||||
/*
|
|
||||||
{
|
{
|
||||||
action: 'log',
|
action: 'log',
|
||||||
type: 'debug'
|
type: 'debug'
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
],
|
],
|
||||||
add: function (e, data) {
|
add: function (e, data) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
data.process(function () {
|
data.process(function () {
|
||||||
return $this.fileupload('process', data);
|
return $this.fileupload('process', data);
|
||||||
});
|
});
|
||||||
originalAdd.call(this, e, data);
|
originalAdd.call(this, e, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
processActions: {
|
processActions: {
|
||||||
/*
|
/*
|
||||||
log: function (data, options) {
|
log: function (data, options) {
|
||||||
console[options.type](
|
console[options.type](
|
||||||
'Processing "' + data.files[data.index].name + '"'
|
'Processing "' + data.files[data.index].name + '"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
|
|
||||||
_processFile: function (data, originalData) {
|
_processFile: function (data, originalData) {
|
||||||
var that = this,
|
var that = this,
|
||||||
dfd = $.Deferred().resolveWith(that, [data]),
|
// eslint-disable-next-line new-cap
|
||||||
chain = dfd.promise();
|
dfd = $.Deferred().resolveWith(that, [data]),
|
||||||
this._trigger('process', null, data);
|
chain = dfd.promise();
|
||||||
$.each(data.processQueue, function (i, settings) {
|
this._trigger('process', null, data);
|
||||||
var func = function (data) {
|
$.each(data.processQueue, function (i, settings) {
|
||||||
if (originalData.errorThrown) {
|
var func = function (data) {
|
||||||
return $.Deferred()
|
if (originalData.errorThrown) {
|
||||||
.rejectWith(that, [originalData]).promise();
|
// eslint-disable-next-line new-cap
|
||||||
}
|
return $.Deferred().rejectWith(that, [originalData]).promise();
|
||||||
return that.processActions[settings.action].call(
|
}
|
||||||
that,
|
return that.processActions[settings.action].call(
|
||||||
data,
|
that,
|
||||||
settings
|
data,
|
||||||
);
|
settings
|
||||||
};
|
);
|
||||||
chain = chain.then(func, settings.always && func);
|
};
|
||||||
});
|
chain = chain[that._promisePipe](func, settings.always && func);
|
||||||
chain
|
});
|
||||||
.done(function () {
|
chain
|
||||||
that._trigger('processdone', null, data);
|
.done(function () {
|
||||||
that._trigger('processalways', null, data);
|
that._trigger('processdone', null, data);
|
||||||
})
|
that._trigger('processalways', null, data);
|
||||||
.fail(function () {
|
})
|
||||||
that._trigger('processfail', null, data);
|
.fail(function () {
|
||||||
that._trigger('processalways', null, data);
|
that._trigger('processfail', null, data);
|
||||||
});
|
that._trigger('processalways', null, data);
|
||||||
return chain;
|
});
|
||||||
},
|
return chain;
|
||||||
|
},
|
||||||
|
|
||||||
// Replaces the settings of each processQueue item that
|
// Replaces the settings of each processQueue item that
|
||||||
// are strings starting with an "@", using the remaining
|
// are strings starting with an "@", using the remaining
|
||||||
// substring as key for the option map,
|
// substring as key for the option map,
|
||||||
// e.g. "@autoUpload" is replaced with options.autoUpload:
|
// e.g. "@autoUpload" is replaced with options.autoUpload:
|
||||||
_transformProcessQueue: function (options) {
|
_transformProcessQueue: function (options) {
|
||||||
var processQueue = [];
|
var processQueue = [];
|
||||||
$.each(options.processQueue, function () {
|
$.each(options.processQueue, function () {
|
||||||
var settings = {},
|
var settings = {},
|
||||||
action = this.action,
|
action = this.action,
|
||||||
prefix = this.prefix === true ? action : this.prefix;
|
prefix = this.prefix === true ? action : this.prefix;
|
||||||
$.each(this, function (key, value) {
|
$.each(this, function (key, value) {
|
||||||
if ($.type(value) === 'string' &&
|
if ($.type(value) === 'string' && value.charAt(0) === '@') {
|
||||||
value.charAt(0) === '@') {
|
settings[key] =
|
||||||
settings[key] = options[
|
options[
|
||||||
value.slice(1) || (prefix ? prefix +
|
value.slice(1) ||
|
||||||
key.charAt(0).toUpperCase() + key.slice(1) : key)
|
(prefix
|
||||||
];
|
? prefix + key.charAt(0).toUpperCase() + key.slice(1)
|
||||||
} else {
|
: key)
|
||||||
settings[key] = value;
|
];
|
||||||
}
|
} else {
|
||||||
|
settings[key] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
processQueue.push(settings);
|
||||||
|
});
|
||||||
|
options.processQueue = processQueue;
|
||||||
|
},
|
||||||
|
|
||||||
});
|
// Returns the number of files currently in the processsing queue:
|
||||||
processQueue.push(settings);
|
processing: function () {
|
||||||
});
|
return this._processing;
|
||||||
options.processQueue = processQueue;
|
},
|
||||||
},
|
|
||||||
|
|
||||||
// Returns the number of files currently in the processsing queue:
|
// Processes the files given as files property of the data parameter,
|
||||||
processing: function () {
|
// returns a Promise object that allows to bind callbacks:
|
||||||
return this._processing;
|
process: function (data) {
|
||||||
},
|
var that = this,
|
||||||
|
options = $.extend({}, this.options, data);
|
||||||
// Processes the files given as files property of the data parameter,
|
if (options.processQueue && options.processQueue.length) {
|
||||||
// returns a Promise object that allows to bind callbacks:
|
this._transformProcessQueue(options);
|
||||||
process: function (data) {
|
if (this._processing === 0) {
|
||||||
var that = this,
|
this._trigger('processstart');
|
||||||
options = $.extend({}, this.options, data);
|
|
||||||
if (options.processQueue && options.processQueue.length) {
|
|
||||||
this._transformProcessQueue(options);
|
|
||||||
if (this._processing === 0) {
|
|
||||||
this._trigger('processstart');
|
|
||||||
}
|
|
||||||
$.each(data.files, function (index) {
|
|
||||||
var opts = index ? $.extend({}, options) : options,
|
|
||||||
func = function () {
|
|
||||||
if (data.errorThrown) {
|
|
||||||
return $.Deferred()
|
|
||||||
.rejectWith(that, [data]).promise();
|
|
||||||
}
|
|
||||||
return that._processFile(opts, data);
|
|
||||||
};
|
|
||||||
opts.index = index;
|
|
||||||
that._processing += 1;
|
|
||||||
that._processingQueue = that._processingQueue.then(func, func)
|
|
||||||
.always(function () {
|
|
||||||
that._processing -= 1;
|
|
||||||
if (that._processing === 0) {
|
|
||||||
that._trigger('processstop');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return this._processingQueue;
|
|
||||||
},
|
|
||||||
|
|
||||||
_create: function () {
|
|
||||||
this._super();
|
|
||||||
this._processing = 0;
|
|
||||||
this._processingQueue = $.Deferred().resolveWith(this)
|
|
||||||
.promise();
|
|
||||||
}
|
}
|
||||||
|
$.each(data.files, function (index) {
|
||||||
|
var opts = index ? $.extend({}, options) : options,
|
||||||
|
func = function () {
|
||||||
|
if (data.errorThrown) {
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
return $.Deferred().rejectWith(that, [data]).promise();
|
||||||
|
}
|
||||||
|
return that._processFile(opts, data);
|
||||||
|
};
|
||||||
|
opts.index = index;
|
||||||
|
that._processing += 1;
|
||||||
|
that._processingQueue = that._processingQueue[that._promisePipe](
|
||||||
|
func,
|
||||||
|
func
|
||||||
|
).always(function () {
|
||||||
|
that._processing -= 1;
|
||||||
|
if (that._processing === 0) {
|
||||||
|
that._trigger('processstop');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return this._processingQueue;
|
||||||
|
},
|
||||||
|
|
||||||
});
|
_create: function () {
|
||||||
|
this._super();
|
||||||
}));
|
this._processing = 0;
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
|
this._processingQueue = $.Deferred().resolveWith(this).promise();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,53 +9,42 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global define, require, window */
|
/* global define, require */
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define([
|
define(['jquery', './jquery.fileupload-process'], factory);
|
||||||
'jquery',
|
} else if (typeof exports === 'object') {
|
||||||
'./jquery.fileupload-process'
|
// Node/CommonJS:
|
||||||
], factory);
|
factory(require('jquery'), require('./jquery.fileupload-process'));
|
||||||
} else if (typeof exports === 'object') {
|
} else {
|
||||||
// Node/CommonJS:
|
// Browser globals:
|
||||||
factory(
|
factory(window.jQuery);
|
||||||
require('jquery'),
|
}
|
||||||
require('./jquery.fileupload-process')
|
})(function ($) {
|
||||||
);
|
'use strict';
|
||||||
} else {
|
|
||||||
// Browser globals:
|
|
||||||
factory(
|
|
||||||
window.jQuery
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(function ($) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Append to the default processQueue:
|
// Append to the default processQueue:
|
||||||
$.blueimp.fileupload.prototype.options.processQueue.push(
|
$.blueimp.fileupload.prototype.options.processQueue.push({
|
||||||
{
|
action: 'validate',
|
||||||
action: 'validate',
|
// Always trigger this action,
|
||||||
// Always trigger this action,
|
// even if the previous action was rejected:
|
||||||
// even if the previous action was rejected:
|
always: true,
|
||||||
always: true,
|
// Options taken from the global options map:
|
||||||
// Options taken from the global options map:
|
acceptFileTypes: '@',
|
||||||
acceptFileTypes: '@',
|
maxFileSize: '@',
|
||||||
maxFileSize: '@',
|
minFileSize: '@',
|
||||||
minFileSize: '@',
|
maxNumberOfFiles: '@',
|
||||||
maxNumberOfFiles: '@',
|
disabled: '@disableValidation'
|
||||||
disabled: '@disableValidation'
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// The File Upload Validation plugin extends the fileupload widget
|
// The File Upload Validation plugin extends the fileupload widget
|
||||||
// with file validation functionality:
|
// with file validation functionality:
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
||||||
|
options: {
|
||||||
options: {
|
/*
|
||||||
/*
|
|
||||||
// The regular expression for allowed file types, matches
|
// The regular expression for allowed file types, matches
|
||||||
// against either file type or file name:
|
// against either file type or file name:
|
||||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
|
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
|
||||||
|
@ -67,59 +56,64 @@
|
||||||
maxNumberOfFiles: 10,
|
maxNumberOfFiles: 10,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Function returning the current number of files,
|
// Function returning the current number of files,
|
||||||
// has to be overriden for maxNumberOfFiles validation:
|
// has to be overriden for maxNumberOfFiles validation:
|
||||||
getNumberOfFiles: $.noop,
|
getNumberOfFiles: $.noop,
|
||||||
|
|
||||||
// Error and info messages:
|
// Error and info messages:
|
||||||
messages: {
|
messages: {
|
||||||
maxNumberOfFiles: 'Maximum number of files exceeded',
|
maxNumberOfFiles: 'Maximum number of files exceeded',
|
||||||
acceptFileTypes: 'File type not allowed',
|
acceptFileTypes: 'File type not allowed',
|
||||||
maxFileSize: 'File is too large',
|
maxFileSize: 'File is too large',
|
||||||
minFileSize: 'File is too small'
|
minFileSize: 'File is too small'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
processActions: {
|
|
||||||
|
|
||||||
validate: function (data, options) {
|
|
||||||
if (options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var dfd = $.Deferred(),
|
|
||||||
settings = this.options,
|
|
||||||
file = data.files[data.index],
|
|
||||||
fileSize;
|
|
||||||
if (options.minFileSize || options.maxFileSize) {
|
|
||||||
fileSize = file.size;
|
|
||||||
}
|
|
||||||
if ($.type(options.maxNumberOfFiles) === 'number' &&
|
|
||||||
(settings.getNumberOfFiles() || 0) + data.files.length >
|
|
||||||
options.maxNumberOfFiles) {
|
|
||||||
file.error = settings.i18n('maxNumberOfFiles');
|
|
||||||
} else if (options.acceptFileTypes &&
|
|
||||||
!(options.acceptFileTypes.test(file.type) ||
|
|
||||||
options.acceptFileTypes.test(file.name))) {
|
|
||||||
file.error = settings.i18n('acceptFileTypes');
|
|
||||||
} else if (fileSize > options.maxFileSize) {
|
|
||||||
file.error = settings.i18n('maxFileSize');
|
|
||||||
} else if ($.type(fileSize) === 'number' &&
|
|
||||||
fileSize < options.minFileSize) {
|
|
||||||
file.error = settings.i18n('minFileSize');
|
|
||||||
} else {
|
|
||||||
delete file.error;
|
|
||||||
}
|
|
||||||
if (file.error || data.files.error) {
|
|
||||||
data.files.error = true;
|
|
||||||
dfd.rejectWith(this, [data]);
|
|
||||||
} else {
|
|
||||||
dfd.resolveWith(this, [data]);
|
|
||||||
}
|
|
||||||
return dfd.promise();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
processActions: {
|
||||||
|
validate: function (data, options) {
|
||||||
|
if (options.disabled) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
});
|
var dfd = $.Deferred(),
|
||||||
|
settings = this.options,
|
||||||
}));
|
file = data.files[data.index],
|
||||||
|
fileSize;
|
||||||
|
if (options.minFileSize || options.maxFileSize) {
|
||||||
|
fileSize = file.size;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
$.type(options.maxNumberOfFiles) === 'number' &&
|
||||||
|
(settings.getNumberOfFiles() || 0) + data.files.length >
|
||||||
|
options.maxNumberOfFiles
|
||||||
|
) {
|
||||||
|
file.error = settings.i18n('maxNumberOfFiles');
|
||||||
|
} else if (
|
||||||
|
options.acceptFileTypes &&
|
||||||
|
!(
|
||||||
|
options.acceptFileTypes.test(file.type) ||
|
||||||
|
options.acceptFileTypes.test(file.name)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
file.error = settings.i18n('acceptFileTypes');
|
||||||
|
} else if (fileSize > options.maxFileSize) {
|
||||||
|
file.error = settings.i18n('maxFileSize');
|
||||||
|
} else if (
|
||||||
|
$.type(fileSize) === 'number' &&
|
||||||
|
fileSize < options.minFileSize
|
||||||
|
) {
|
||||||
|
file.error = settings.i18n('minFileSize');
|
||||||
|
} else {
|
||||||
|
delete file.error;
|
||||||
|
}
|
||||||
|
if (file.error || data.files.error) {
|
||||||
|
data.files.error = true;
|
||||||
|
dfd.rejectWith(this, [data]);
|
||||||
|
} else {
|
||||||
|
dfd.resolveWith(this, [data]);
|
||||||
|
}
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -9,105 +9,93 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* jshint nomen:false */
|
/* global define, require */
|
||||||
/* global define, require, window, document */
|
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define([
|
define(['jquery', 'load-image', './jquery.fileupload-process'], factory);
|
||||||
'jquery',
|
} else if (typeof exports === 'object') {
|
||||||
'load-image',
|
// Node/CommonJS:
|
||||||
'./jquery.fileupload-process'
|
factory(
|
||||||
], factory);
|
require('jquery'),
|
||||||
} else if (typeof exports === 'object') {
|
require('blueimp-load-image/js/load-image'),
|
||||||
// Node/CommonJS:
|
require('./jquery.fileupload-process')
|
||||||
factory(
|
|
||||||
require('jquery'),
|
|
||||||
require('blueimp-load-image/js/load-image'),
|
|
||||||
require('./jquery.fileupload-process')
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// Browser globals:
|
|
||||||
factory(
|
|
||||||
window.jQuery,
|
|
||||||
window.loadImage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}(function ($, loadImage) {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Prepend to the default processQueue:
|
|
||||||
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
|
||||||
{
|
|
||||||
action: 'loadVideo',
|
|
||||||
// Use the action as prefix for the "@" options:
|
|
||||||
prefix: true,
|
|
||||||
fileTypes: '@',
|
|
||||||
maxFileSize: '@',
|
|
||||||
disabled: '@disableVideoPreview'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: 'setVideo',
|
|
||||||
name: '@videoPreviewName',
|
|
||||||
disabled: '@disableVideoPreview'
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
// Browser globals:
|
||||||
|
factory(window.jQuery, window.loadImage);
|
||||||
|
}
|
||||||
|
})(function ($, loadImage) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
// The File Upload Video Preview plugin extends the fileupload widget
|
// Prepend to the default processQueue:
|
||||||
// with video preview functionality:
|
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
||||||
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
{
|
||||||
|
action: 'loadVideo',
|
||||||
|
// Use the action as prefix for the "@" options:
|
||||||
|
prefix: true,
|
||||||
|
fileTypes: '@',
|
||||||
|
maxFileSize: '@',
|
||||||
|
disabled: '@disableVideoPreview'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'setVideo',
|
||||||
|
name: '@videoPreviewName',
|
||||||
|
disabled: '@disableVideoPreview'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
options: {
|
// The File Upload Video Preview plugin extends the fileupload widget
|
||||||
// The regular expression for the types of video files to load,
|
// with video preview functionality:
|
||||||
// matched against the file type:
|
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
||||||
loadVideoFileTypes: /^video\/.*$/
|
options: {
|
||||||
},
|
// The regular expression for the types of video files to load,
|
||||||
|
// matched against the file type:
|
||||||
|
loadVideoFileTypes: /^video\/.*$/
|
||||||
|
},
|
||||||
|
|
||||||
_videoElement: document.createElement('video'),
|
_videoElement: document.createElement('video'),
|
||||||
|
|
||||||
processActions: {
|
|
||||||
|
|
||||||
// Loads the video file given via data.files and data.index
|
|
||||||
// as video element if the browser supports playing it.
|
|
||||||
// Accepts the options fileTypes (regular expression)
|
|
||||||
// and maxFileSize (integer) to limit the files to load:
|
|
||||||
loadVideo: function (data, options) {
|
|
||||||
if (options.disabled) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
var file = data.files[data.index],
|
|
||||||
url,
|
|
||||||
video;
|
|
||||||
if (this._videoElement.canPlayType &&
|
|
||||||
this._videoElement.canPlayType(file.type) &&
|
|
||||||
($.type(options.maxFileSize) !== 'number' ||
|
|
||||||
file.size <= options.maxFileSize) &&
|
|
||||||
(!options.fileTypes ||
|
|
||||||
options.fileTypes.test(file.type))) {
|
|
||||||
url = loadImage.createObjectURL(file);
|
|
||||||
if (url) {
|
|
||||||
video = this._videoElement.cloneNode(false);
|
|
||||||
video.src = url;
|
|
||||||
video.controls = true;
|
|
||||||
data.video = video;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Sets the video element as a property of the file object:
|
|
||||||
setVideo: function (data, options) {
|
|
||||||
if (data.video && !options.disabled) {
|
|
||||||
data.files[data.index][options.name || 'preview'] = data.video;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
processActions: {
|
||||||
|
// Loads the video file given via data.files and data.index
|
||||||
|
// as video element if the browser supports playing it.
|
||||||
|
// Accepts the options fileTypes (regular expression)
|
||||||
|
// and maxFileSize (integer) to limit the files to load:
|
||||||
|
loadVideo: function (data, options) {
|
||||||
|
if (options.disabled) {
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
var file = data.files[data.index],
|
||||||
|
url,
|
||||||
|
video;
|
||||||
|
if (
|
||||||
|
this._videoElement.canPlayType &&
|
||||||
|
this._videoElement.canPlayType(file.type) &&
|
||||||
|
($.type(options.maxFileSize) !== 'number' ||
|
||||||
|
file.size <= options.maxFileSize) &&
|
||||||
|
(!options.fileTypes || options.fileTypes.test(file.type))
|
||||||
|
) {
|
||||||
|
url = loadImage.createObjectURL(file);
|
||||||
|
if (url) {
|
||||||
|
video = this._videoElement.cloneNode(false);
|
||||||
|
video.src = url;
|
||||||
|
video.controls = true;
|
||||||
|
data.video = video;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
|
||||||
});
|
// Sets the video element as a property of the file object:
|
||||||
|
setVideo: function (data, options) {
|
||||||
}));
|
if (data.video && !options.disabled) {
|
||||||
|
data.files[data.index][options.name || 'preview'] = data.video;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,216 +9,219 @@
|
||||||
* https://opensource.org/licenses/MIT
|
* https://opensource.org/licenses/MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* global define, require, window, document, JSON */
|
/* global define, require */
|
||||||
|
|
||||||
;(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// Register as an anonymous AMD module:
|
// Register as an anonymous AMD module:
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
} else if (typeof exports === 'object') {
|
} else if (typeof exports === 'object') {
|
||||||
// Node/CommonJS:
|
// Node/CommonJS:
|
||||||
factory(require('jquery'));
|
factory(require('jquery'));
|
||||||
} else {
|
} else {
|
||||||
// Browser globals:
|
// Browser globals:
|
||||||
factory(window.jQuery);
|
factory(window.jQuery);
|
||||||
}
|
}
|
||||||
}(function ($) {
|
})(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Helper variable to create unique names for the transport iframes:
|
// Helper variable to create unique names for the transport iframes:
|
||||||
var counter = 0,
|
var counter = 0,
|
||||||
jsonAPI = $,
|
jsonAPI = $,
|
||||||
jsonParse = 'parseJSON';
|
jsonParse = 'parseJSON';
|
||||||
|
|
||||||
if ('JSON' in window && 'parse' in JSON) {
|
if ('JSON' in window && 'parse' in JSON) {
|
||||||
jsonAPI = JSON;
|
jsonAPI = JSON;
|
||||||
jsonParse = 'parse';
|
jsonParse = 'parse';
|
||||||
}
|
}
|
||||||
|
|
||||||
// The iframe transport accepts four additional options:
|
// The iframe transport accepts four additional options:
|
||||||
// options.fileInput: a jQuery collection of file input fields
|
// options.fileInput: a jQuery collection of file input fields
|
||||||
// options.paramName: the parameter name for the file form data,
|
// options.paramName: the parameter name for the file form data,
|
||||||
// overrides the name property of the file input field(s),
|
// overrides the name property of the file input field(s),
|
||||||
// can be a string or an array of strings.
|
// can be a string or an array of strings.
|
||||||
// options.formData: an array of objects with name and value properties,
|
// options.formData: an array of objects with name and value properties,
|
||||||
// equivalent to the return data of .serializeArray(), e.g.:
|
// equivalent to the return data of .serializeArray(), e.g.:
|
||||||
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
// [{name: 'a', value: 1}, {name: 'b', value: 2}]
|
||||||
// options.initialIframeSrc: the URL of the initial iframe src,
|
// options.initialIframeSrc: the URL of the initial iframe src,
|
||||||
// by default set to "javascript:false;"
|
// by default set to "javascript:false;"
|
||||||
$.ajaxTransport('iframe', function (options) {
|
$.ajaxTransport('iframe', function (options) {
|
||||||
if (options.async) {
|
if (options.async) {
|
||||||
// javascript:false as initial iframe src
|
// javascript:false as initial iframe src
|
||||||
// prevents warning popups on HTTPS in IE6:
|
// prevents warning popups on HTTPS in IE6:
|
||||||
/*jshint scripturl: true */
|
// eslint-disable-next-line no-script-url
|
||||||
var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
|
var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
|
||||||
/*jshint scripturl: false */
|
form,
|
||||||
form,
|
iframe,
|
||||||
iframe,
|
addParamChar;
|
||||||
addParamChar;
|
return {
|
||||||
return {
|
send: function (_, completeCallback) {
|
||||||
send: function (_, completeCallback) {
|
form = $('<form style="display:none;"></form>');
|
||||||
form = $('<form style="display:none;"></form>');
|
form.attr('accept-charset', options.formAcceptCharset);
|
||||||
form.attr('accept-charset', options.formAcceptCharset);
|
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
||||||
addParamChar = /\?/.test(options.url) ? '&' : '?';
|
// XDomainRequest only supports GET and POST:
|
||||||
// XDomainRequest only supports GET and POST:
|
if (options.type === 'DELETE') {
|
||||||
if (options.type === 'DELETE') {
|
options.url = options.url + addParamChar + '_method=DELETE';
|
||||||
options.url = options.url + addParamChar + '_method=DELETE';
|
options.type = 'POST';
|
||||||
options.type = 'POST';
|
} else if (options.type === 'PUT') {
|
||||||
} else if (options.type === 'PUT') {
|
options.url = options.url + addParamChar + '_method=PUT';
|
||||||
options.url = options.url + addParamChar + '_method=PUT';
|
options.type = 'POST';
|
||||||
options.type = 'POST';
|
} else if (options.type === 'PATCH') {
|
||||||
} else if (options.type === 'PATCH') {
|
options.url = options.url + addParamChar + '_method=PATCH';
|
||||||
options.url = options.url + addParamChar + '_method=PATCH';
|
options.type = 'POST';
|
||||||
options.type = 'POST';
|
}
|
||||||
}
|
// IE versions below IE8 cannot set the name property of
|
||||||
// IE versions below IE8 cannot set the name property of
|
// elements that have already been added to the DOM,
|
||||||
// elements that have already been added to the DOM,
|
// so we set the name along with the iframe HTML markup:
|
||||||
// so we set the name along with the iframe HTML markup:
|
counter += 1;
|
||||||
counter += 1;
|
iframe = $(
|
||||||
iframe = $(
|
'<iframe src="' +
|
||||||
'<iframe src="' + initialIframeSrc +
|
initialIframeSrc +
|
||||||
'" name="iframe-transport-' + counter + '"></iframe>'
|
'" name="iframe-transport-' +
|
||||||
).bind('load', function () {
|
counter +
|
||||||
var fileInputClones,
|
'"></iframe>'
|
||||||
paramNames = $.isArray(options.paramName) ?
|
).on('load', function () {
|
||||||
options.paramName : [options.paramName];
|
var fileInputClones,
|
||||||
iframe
|
paramNames = $.isArray(options.paramName)
|
||||||
.unbind('load')
|
? options.paramName
|
||||||
.bind('load', function () {
|
: [options.paramName];
|
||||||
var response;
|
iframe.off('load').on('load', function () {
|
||||||
// Wrap in a try/catch block to catch exceptions thrown
|
var response;
|
||||||
// when trying to access cross-domain iframe contents:
|
// Wrap in a try/catch block to catch exceptions thrown
|
||||||
try {
|
// when trying to access cross-domain iframe contents:
|
||||||
response = iframe.contents();
|
try {
|
||||||
// Google Chrome and Firefox do not throw an
|
response = iframe.contents();
|
||||||
// exception when calling iframe.contents() on
|
// Google Chrome and Firefox do not throw an
|
||||||
// cross-domain requests, so we unify the response:
|
// exception when calling iframe.contents() on
|
||||||
if (!response.length || !response[0].firstChild) {
|
// cross-domain requests, so we unify the response:
|
||||||
throw new Error();
|
if (!response.length || !response[0].firstChild) {
|
||||||
}
|
throw new Error();
|
||||||
} catch (e) {
|
|
||||||
response = undefined;
|
|
||||||
}
|
|
||||||
// The complete callback returns the
|
|
||||||
// iframe content document as response object:
|
|
||||||
completeCallback(
|
|
||||||
200,
|
|
||||||
'success',
|
|
||||||
{'iframe': response}
|
|
||||||
);
|
|
||||||
// Fix for IE endless progress bar activity bug
|
|
||||||
// (happens on form submits to iframe targets):
|
|
||||||
$('<iframe src="' + initialIframeSrc + '"></iframe>')
|
|
||||||
.appendTo(form);
|
|
||||||
window.setTimeout(function () {
|
|
||||||
// Removing the form in a setTimeout call
|
|
||||||
// allows Chrome's developer tools to display
|
|
||||||
// the response result
|
|
||||||
form.remove();
|
|
||||||
}, 0);
|
|
||||||
});
|
|
||||||
form
|
|
||||||
.prop('target', iframe.prop('name'))
|
|
||||||
.prop('action', options.url)
|
|
||||||
.prop('method', options.type);
|
|
||||||
if (options.formData) {
|
|
||||||
$.each(options.formData, function (index, field) {
|
|
||||||
$('<input type="hidden"/>')
|
|
||||||
.prop('name', field.name)
|
|
||||||
.val(field.value)
|
|
||||||
.appendTo(form);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (options.fileInput && options.fileInput.length &&
|
|
||||||
options.type === 'POST') {
|
|
||||||
fileInputClones = options.fileInput.clone();
|
|
||||||
// Insert a clone for each file input field:
|
|
||||||
options.fileInput.after(function (index) {
|
|
||||||
return fileInputClones[index];
|
|
||||||
});
|
|
||||||
if (options.paramName) {
|
|
||||||
options.fileInput.each(function (index) {
|
|
||||||
$(this).prop(
|
|
||||||
'name',
|
|
||||||
paramNames[index] || options.paramName
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Appending the file input fields to the hidden form
|
|
||||||
// removes them from their original location:
|
|
||||||
form
|
|
||||||
.append(options.fileInput)
|
|
||||||
.prop('enctype', 'multipart/form-data')
|
|
||||||
// enctype must be set as encoding for IE:
|
|
||||||
.prop('encoding', 'multipart/form-data');
|
|
||||||
// Remove the HTML5 form attribute from the input(s):
|
|
||||||
options.fileInput.removeAttr('form');
|
|
||||||
}
|
|
||||||
form.submit();
|
|
||||||
// Insert the file input fields at their original location
|
|
||||||
// by replacing the clones with the originals:
|
|
||||||
if (fileInputClones && fileInputClones.length) {
|
|
||||||
options.fileInput.each(function (index, input) {
|
|
||||||
var clone = $(fileInputClones[index]);
|
|
||||||
// Restore the original name and form properties:
|
|
||||||
$(input)
|
|
||||||
.prop('name', clone.prop('name'))
|
|
||||||
.attr('form', clone.attr('form'));
|
|
||||||
clone.replaceWith(input);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
form.append(iframe).appendTo(document.body);
|
|
||||||
},
|
|
||||||
abort: function () {
|
|
||||||
if (iframe) {
|
|
||||||
// javascript:false as iframe src aborts the request
|
|
||||||
// and prevents warning popups on HTTPS in IE6.
|
|
||||||
// concat is used to avoid the "Script URL" JSLint error:
|
|
||||||
iframe
|
|
||||||
.unbind('load')
|
|
||||||
.prop('src', initialIframeSrc);
|
|
||||||
}
|
|
||||||
if (form) {
|
|
||||||
form.remove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
} catch (e) {
|
||||||
}
|
response = undefined;
|
||||||
});
|
}
|
||||||
|
// The complete callback returns the
|
||||||
// The iframe transport returns the iframe content document as response.
|
// iframe content document as response object:
|
||||||
// The following adds converters from iframe to text, json, html, xml
|
completeCallback(200, 'success', { iframe: response });
|
||||||
// and script.
|
// Fix for IE endless progress bar activity bug
|
||||||
// Please note that the Content-Type for JSON responses has to be text/plain
|
// (happens on form submits to iframe targets):
|
||||||
// or text/html, if the browser doesn't include application/json in the
|
$('<iframe src="' + initialIframeSrc + '"></iframe>').appendTo(
|
||||||
// Accept header, else IE will show a download dialog.
|
form
|
||||||
// The Content-Type for XML responses on the other hand has to be always
|
);
|
||||||
// application/xml or text/xml, so IE properly parses the XML response.
|
window.setTimeout(function () {
|
||||||
// See also
|
// Removing the form in a setTimeout call
|
||||||
// https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
|
// allows Chrome's developer tools to display
|
||||||
$.ajaxSetup({
|
// the response result
|
||||||
converters: {
|
form.remove();
|
||||||
'iframe text': function (iframe) {
|
}, 0);
|
||||||
return iframe && $(iframe[0].body).text();
|
});
|
||||||
},
|
form
|
||||||
'iframe json': function (iframe) {
|
.prop('target', iframe.prop('name'))
|
||||||
return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
|
.prop('action', options.url)
|
||||||
},
|
.prop('method', options.type);
|
||||||
'iframe html': function (iframe) {
|
if (options.formData) {
|
||||||
return iframe && $(iframe[0].body).html();
|
$.each(options.formData, function (index, field) {
|
||||||
},
|
$('<input type="hidden"/>')
|
||||||
'iframe xml': function (iframe) {
|
.prop('name', field.name)
|
||||||
var xmlDoc = iframe && iframe[0];
|
.val(field.value)
|
||||||
return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc :
|
.appendTo(form);
|
||||||
$.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
|
});
|
||||||
$(xmlDoc.body).html());
|
|
||||||
},
|
|
||||||
'iframe script': function (iframe) {
|
|
||||||
return iframe && $.globalEval($(iframe[0].body).text());
|
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
options.fileInput &&
|
||||||
|
options.fileInput.length &&
|
||||||
|
options.type === 'POST'
|
||||||
|
) {
|
||||||
|
fileInputClones = options.fileInput.clone();
|
||||||
|
// Insert a clone for each file input field:
|
||||||
|
options.fileInput.after(function (index) {
|
||||||
|
return fileInputClones[index];
|
||||||
|
});
|
||||||
|
if (options.paramName) {
|
||||||
|
options.fileInput.each(function (index) {
|
||||||
|
$(this).prop('name', paramNames[index] || options.paramName);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// Appending the file input fields to the hidden form
|
||||||
|
// removes them from their original location:
|
||||||
|
form
|
||||||
|
.append(options.fileInput)
|
||||||
|
.prop('enctype', 'multipart/form-data')
|
||||||
|
// enctype must be set as encoding for IE:
|
||||||
|
.prop('encoding', 'multipart/form-data');
|
||||||
|
// Remove the HTML5 form attribute from the input(s):
|
||||||
|
options.fileInput.removeAttr('form');
|
||||||
|
}
|
||||||
|
window.setTimeout(function () {
|
||||||
|
// Submitting the form in a setTimeout call fixes an issue with
|
||||||
|
// Safari 13 not triggering the iframe load event after resetting
|
||||||
|
// the load event handler, see also:
|
||||||
|
// https://github.com/blueimp/jQuery-File-Upload/issues/3633
|
||||||
|
form.submit();
|
||||||
|
// Insert the file input fields at their original location
|
||||||
|
// by replacing the clones with the originals:
|
||||||
|
if (fileInputClones && fileInputClones.length) {
|
||||||
|
options.fileInput.each(function (index, input) {
|
||||||
|
var clone = $(fileInputClones[index]);
|
||||||
|
// Restore the original name and form properties:
|
||||||
|
$(input)
|
||||||
|
.prop('name', clone.prop('name'))
|
||||||
|
.attr('form', clone.attr('form'));
|
||||||
|
clone.replaceWith(input);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
form.append(iframe).appendTo(document.body);
|
||||||
|
},
|
||||||
|
abort: function () {
|
||||||
|
if (iframe) {
|
||||||
|
// javascript:false as iframe src aborts the request
|
||||||
|
// and prevents warning popups on HTTPS in IE6.
|
||||||
|
iframe.off('load').prop('src', initialIframeSrc);
|
||||||
|
}
|
||||||
|
if (form) {
|
||||||
|
form.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}));
|
// The iframe transport returns the iframe content document as response.
|
||||||
|
// The following adds converters from iframe to text, json, html, xml
|
||||||
|
// and script.
|
||||||
|
// Please note that the Content-Type for JSON responses has to be text/plain
|
||||||
|
// or text/html, if the browser doesn't include application/json in the
|
||||||
|
// Accept header, else IE will show a download dialog.
|
||||||
|
// The Content-Type for XML responses on the other hand has to be always
|
||||||
|
// application/xml or text/xml, so IE properly parses the XML response.
|
||||||
|
// See also
|
||||||
|
// https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
|
||||||
|
$.ajaxSetup({
|
||||||
|
converters: {
|
||||||
|
'iframe text': function (iframe) {
|
||||||
|
return iframe && $(iframe[0].body).text();
|
||||||
|
},
|
||||||
|
'iframe json': function (iframe) {
|
||||||
|
return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
|
||||||
|
},
|
||||||
|
'iframe html': function (iframe) {
|
||||||
|
return iframe && $(iframe[0].body).html();
|
||||||
|
},
|
||||||
|
'iframe xml': function (iframe) {
|
||||||
|
var xmlDoc = iframe && iframe[0];
|
||||||
|
return xmlDoc && $.isXMLDoc(xmlDoc)
|
||||||
|
? xmlDoc
|
||||||
|
: $.parseXML(
|
||||||
|
(xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
|
||||||
|
$(xmlDoc.body).html()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
'iframe script': function (iframe) {
|
||||||
|
return iframe && $.globalEval($(iframe[0].body).text());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
75
vendor/blueimp/jquery-file-upload/js/main.js
vendored
75
vendor/blueimp/jquery-file-upload/js/main.js
vendored
|
@ -1,75 +0,0 @@
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin JS Example
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2010, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* https://opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* global $, window */
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// Initialize the jQuery File Upload widget:
|
|
||||||
$('#fileupload').fileupload({
|
|
||||||
// Uncomment the following to send cross-domain cookies:
|
|
||||||
//xhrFields: {withCredentials: true},
|
|
||||||
url: 'server/php/'
|
|
||||||
});
|
|
||||||
|
|
||||||
// Enable iframe cross-domain access via redirect option:
|
|
||||||
$('#fileupload').fileupload(
|
|
||||||
'option',
|
|
||||||
'redirect',
|
|
||||||
window.location.href.replace(
|
|
||||||
/\/[^\/]*$/,
|
|
||||||
'/cors/result.html?%s'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (window.location.hostname === 'blueimp.github.io') {
|
|
||||||
// Demo settings:
|
|
||||||
$('#fileupload').fileupload('option', {
|
|
||||||
url: '//jquery-file-upload.appspot.com/',
|
|
||||||
// Enable image resizing, except for Android and Opera,
|
|
||||||
// which actually support image resizing, but fail to
|
|
||||||
// send Blob objects via XHR requests:
|
|
||||||
disableImageResize: /Android(?!.*Chrome)|Opera/
|
|
||||||
.test(window.navigator.userAgent),
|
|
||||||
maxFileSize: 999000,
|
|
||||||
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
|
|
||||||
});
|
|
||||||
// Upload server status check for browsers with CORS support:
|
|
||||||
if ($.support.cors) {
|
|
||||||
$.ajax({
|
|
||||||
url: '//jquery-file-upload.appspot.com/',
|
|
||||||
type: 'HEAD'
|
|
||||||
}).fail(function () {
|
|
||||||
$('<div class="alert alert-danger"/>')
|
|
||||||
.text('Upload server currently unavailable - ' +
|
|
||||||
new Date())
|
|
||||||
.appendTo('#fileupload');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Load existing files:
|
|
||||||
$('#fileupload').addClass('fileupload-processing');
|
|
||||||
$.ajax({
|
|
||||||
// Uncomment the following to send cross-domain cookies:
|
|
||||||
//xhrFields: {withCredentials: true},
|
|
||||||
url: $('#fileupload').fileupload('option', 'url'),
|
|
||||||
dataType: 'json',
|
|
||||||
context: $('#fileupload')[0]
|
|
||||||
}).always(function () {
|
|
||||||
$(this).removeClass('fileupload-processing');
|
|
||||||
}).done(function (result) {
|
|
||||||
$(this).fileupload('option', 'done')
|
|
||||||
.call(this, $.Event('done'), {result: result});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
File diff suppressed because it is too large
Load diff
2862
vendor/blueimp/jquery-file-upload/package-lock.json
generated
vendored
Normal file
2862
vendor/blueimp/jquery-file-upload/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
81
vendor/blueimp/jquery-file-upload/package.json
vendored
81
vendor/blueimp/jquery-file-upload/package.json
vendored
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "blueimp-file-upload",
|
"name": "blueimp-file-upload",
|
||||||
"version": "9.34.0",
|
"version": "10.31.0",
|
||||||
"title": "jQuery File Upload",
|
"title": "jQuery File Upload",
|
||||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -34,22 +34,83 @@
|
||||||
"url": "git://github.com/blueimp/jQuery-File-Upload.git"
|
"url": "git://github.com/blueimp/jQuery-File-Upload.git"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"jquery": ">=1.7"
|
||||||
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"blueimp-canvas-to-blob": "3.5.0",
|
"blueimp-canvas-to-blob": "3",
|
||||||
"blueimp-load-image": "2.12.2",
|
"blueimp-load-image": "5",
|
||||||
"blueimp-tmpl": "3.6.0"
|
"blueimp-tmpl": "3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower-json": "0.8.1",
|
"eslint": "7",
|
||||||
"jshint": "2.9.3"
|
"eslint-config-blueimp": "2",
|
||||||
|
"eslint-config-prettier": "6",
|
||||||
|
"eslint-plugin-jsdoc": "29",
|
||||||
|
"eslint-plugin-prettier": "3",
|
||||||
|
"prettier": "2",
|
||||||
|
"stylelint": "13",
|
||||||
|
"stylelint-config-prettier": "8",
|
||||||
|
"stylelint-config-recommended": "3"
|
||||||
|
},
|
||||||
|
"stylelint": {
|
||||||
|
"extends": [
|
||||||
|
"stylelint-config-recommended",
|
||||||
|
"stylelint-config-prettier"
|
||||||
|
],
|
||||||
|
"ignoreFiles": [
|
||||||
|
"css/*.min.css",
|
||||||
|
"css/vendor/*",
|
||||||
|
"test/vendor/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": [
|
||||||
|
"blueimp",
|
||||||
|
"plugin:jsdoc/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"eslintIgnore": [
|
||||||
|
"js/*.min.js",
|
||||||
|
"test/vendor"
|
||||||
|
],
|
||||||
|
"prettier": {
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"proseWrap": "always",
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "none"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bower-version-update": "./bower-version-update.js",
|
"lint": "stylelint '**/*.css' && eslint .",
|
||||||
"lint": "jshint *.js js/*.js js/cors/*.js",
|
"unit": "docker-compose run --rm mocha",
|
||||||
"test": "npm run lint",
|
"wdio": "docker-compose run --rm wdio",
|
||||||
|
"test": "npm run lint && npm run unit && npm run wdio && npm run wdio -- conf/firefox.js",
|
||||||
|
"posttest": "docker-compose down -v",
|
||||||
"preversion": "npm test",
|
"preversion": "npm test",
|
||||||
"version": "npm run bower-version-update && git add bower.json",
|
|
||||||
"postversion": "git push --tags origin master && npm publish"
|
"postversion": "git push --tags origin master && npm publish"
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
"css/jquery.fileupload-noscript.css",
|
||||||
|
"css/jquery.fileupload-ui-noscript.css",
|
||||||
|
"css/jquery.fileupload-ui.css",
|
||||||
|
"css/jquery.fileupload.css",
|
||||||
|
"img/loading.gif",
|
||||||
|
"img/progressbar.gif",
|
||||||
|
"js/cors/jquery.postmessage-transport.js",
|
||||||
|
"js/cors/jquery.xdr-transport.js",
|
||||||
|
"js/vendor/jquery.ui.widget.js",
|
||||||
|
"js/jquery.fileupload-audio.js",
|
||||||
|
"js/jquery.fileupload-image.js",
|
||||||
|
"js/jquery.fileupload-process.js",
|
||||||
|
"js/jquery.fileupload-ui.js",
|
||||||
|
"js/jquery.fileupload-validate.js",
|
||||||
|
"js/jquery.fileupload-video.js",
|
||||||
|
"js/jquery.fileupload.js",
|
||||||
|
"js/jquery.iframe-transport.js"
|
||||||
|
],
|
||||||
"main": "js/jquery.fileupload.js"
|
"main": "js/jquery.fileupload.js"
|
||||||
}
|
}
|
||||||
|
|
2
vendor/blueimp/jquery-file-upload/server/php/.dockerignore
vendored
Normal file
2
vendor/blueimp/jquery-file-upload/server/php/.dockerignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!php.ini
|
|
@ -1,4 +1,4 @@
|
||||||
FROM php:7-apache
|
FROM php:7.4-apache
|
||||||
|
|
||||||
# Enable the Apache Headers module:
|
# Enable the Apache Headers module:
|
||||||
RUN ln -s /etc/apache2/mods-available/headers.load \
|
RUN ln -s /etc/apache2/mods-available/headers.load \
|
||||||
|
@ -11,28 +11,34 @@ RUN ln -s /etc/apache2/mods-available/rewrite.load \
|
||||||
# Install GD, Imagick and ImageMagick as image conversion options:
|
# Install GD, Imagick and ImageMagick as image conversion options:
|
||||||
RUN DEBIAN_FRONTEND=noninteractive \
|
RUN DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get update && apt-get install -y --no-install-recommends \
|
apt-get update && apt-get install -y --no-install-recommends \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libmagickwand-dev \
|
libmagickwand-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
&& pecl install \
|
&& pecl install \
|
||||||
imagick \
|
imagick \
|
||||||
&& docker-php-ext-enable \
|
&& docker-php-ext-enable \
|
||||||
imagick \
|
imagick \
|
||||||
&& docker-php-ext-configure \
|
&& docker-php-ext-configure \
|
||||||
gd --with-jpeg-dir=/usr/include/ \
|
gd --with-jpeg=/usr/include/ \
|
||||||
&& docker-php-ext-install \
|
&& docker-php-ext-install \
|
||||||
gd \
|
gd \
|
||||||
# Uninstall obsolete packages:
|
# Uninstall obsolete packages:
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libmagickwand-dev \
|
libmagickwand-dev \
|
||||||
# Remove obsolete files:
|
# Remove obsolete files:
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/usr/share/doc/* \
|
/usr/share/doc/* \
|
||||||
/var/cache/* \
|
/var/cache/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
|
# Use the default development configuration:
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
|
# Add a custom configuration file:
|
||||||
|
COPY php.ini "$PHP_INI_DIR/conf.d/"
|
||||||
|
|
|
@ -16,7 +16,7 @@ class UploadHandler
|
||||||
protected $options;
|
protected $options;
|
||||||
|
|
||||||
// PHP File Upload error message codes:
|
// PHP File Upload error message codes:
|
||||||
// http://php.net/manual/en/features.file-upload.errors.php
|
// https://php.net/manual/en/features.file-upload.errors.php
|
||||||
protected $error_messages = array(
|
protected $error_messages = array(
|
||||||
1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
|
1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
|
||||||
2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
|
2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
|
||||||
|
@ -30,6 +30,7 @@ class UploadHandler
|
||||||
'min_file_size' => 'File is too small',
|
'min_file_size' => 'File is too small',
|
||||||
'accept_file_types' => 'Filetype not allowed',
|
'accept_file_types' => 'Filetype not allowed',
|
||||||
'max_number_of_files' => 'Maximum number of files exceeded',
|
'max_number_of_files' => 'Maximum number of files exceeded',
|
||||||
|
'invalid_file_type' => 'Invalid file type',
|
||||||
'max_width' => 'Image exceeds maximum width',
|
'max_width' => 'Image exceeds maximum width',
|
||||||
'min_width' => 'Image requires a minimum width',
|
'min_width' => 'Image requires a minimum width',
|
||||||
'max_height' => 'Image exceeds maximum height',
|
'max_height' => 'Image exceeds maximum height',
|
||||||
|
@ -38,9 +39,9 @@ class UploadHandler
|
||||||
'image_resize' => 'Failed to resize image'
|
'image_resize' => 'Failed to resize image'
|
||||||
);
|
);
|
||||||
|
|
||||||
const IMAGETYPE_GIF = 1;
|
const IMAGETYPE_GIF = 'image/gif';
|
||||||
const IMAGETYPE_JPEG = 2;
|
const IMAGETYPE_JPEG = 'image/jpeg';
|
||||||
const IMAGETYPE_PNG = 3;
|
const IMAGETYPE_PNG = 'image/png';
|
||||||
|
|
||||||
protected $image_objects = array();
|
protected $image_objects = array();
|
||||||
protected $response = array();
|
protected $response = array();
|
||||||
|
@ -324,7 +325,7 @@ class UploadHandler
|
||||||
|
|
||||||
protected function is_valid_file_object($file_name) {
|
protected function is_valid_file_object($file_name) {
|
||||||
$file_path = $this->get_upload_path($file_name);
|
$file_path = $this->get_upload_path($file_name);
|
||||||
if (is_file($file_path) && $file_name[0] !== '.') {
|
if (strlen($file_name) > 0 && $file_name[0] !== '.' && is_file($file_path)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -393,7 +394,53 @@ class UploadHandler
|
||||||
return $this->fix_integer_overflow($val);
|
return $this->fix_integer_overflow($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function validate($uploaded_file, $file, $error, $index) {
|
protected function validate_image_file($uploaded_file, $file, $error, $index) {
|
||||||
|
if ($this->imagetype($uploaded_file) !== $this->get_file_type($file->name)) {
|
||||||
|
$file->error = $this->get_error_message('invalid_file_type');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$max_width = @$this->options['max_width'];
|
||||||
|
$max_height = @$this->options['max_height'];
|
||||||
|
$min_width = @$this->options['min_width'];
|
||||||
|
$min_height = @$this->options['min_height'];
|
||||||
|
if ($max_width || $max_height || $min_width || $min_height) {
|
||||||
|
list($img_width, $img_height) = $this->get_image_size($uploaded_file);
|
||||||
|
// If we are auto rotating the image by default, do the checks on
|
||||||
|
// the correct orientation
|
||||||
|
if (
|
||||||
|
@$this->options['image_versions']['']['auto_orient'] &&
|
||||||
|
function_exists('exif_read_data') &&
|
||||||
|
($exif = @exif_read_data($uploaded_file)) &&
|
||||||
|
(((int) @$exif['Orientation']) >= 5)
|
||||||
|
) {
|
||||||
|
$tmp = $img_width;
|
||||||
|
$img_width = $img_height;
|
||||||
|
$img_height = $tmp;
|
||||||
|
unset($tmp);
|
||||||
|
}
|
||||||
|
if (!empty($img_width) && !empty($img_height)) {
|
||||||
|
if ($max_width && $img_width > $max_width) {
|
||||||
|
$file->error = $this->get_error_message('max_width');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($max_height && $img_height > $max_height) {
|
||||||
|
$file->error = $this->get_error_message('max_height');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($min_width && $img_width < $min_width) {
|
||||||
|
$file->error = $this->get_error_message('min_width');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($min_height && $img_height < $min_height) {
|
||||||
|
$file->error = $this->get_error_message('min_height');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function validate($uploaded_file, $file, $error, $index, $content_range) {
|
||||||
if ($error) {
|
if ($error) {
|
||||||
$file->error = $this->get_error_message($error);
|
$file->error = $this->get_error_message($error);
|
||||||
return false;
|
return false;
|
||||||
|
@ -434,44 +481,8 @@ class UploadHandler
|
||||||
$file->error = $this->get_error_message('max_number_of_files');
|
$file->error = $this->get_error_message('max_number_of_files');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$max_width = @$this->options['max_width'];
|
if (!$content_range && $this->has_image_file_extension($file->name)) {
|
||||||
$max_height = @$this->options['max_height'];
|
return $this->validate_image_file($uploaded_file, $file, $error, $index);
|
||||||
$min_width = @$this->options['min_width'];
|
|
||||||
$min_height = @$this->options['min_height'];
|
|
||||||
if (($max_width || $max_height || $min_width || $min_height)
|
|
||||||
&& $this->is_valid_image_file($uploaded_file)) {
|
|
||||||
list($img_width, $img_height) = $this->get_image_size($uploaded_file);
|
|
||||||
// If we are auto rotating the image by default, do the checks on
|
|
||||||
// the correct orientation
|
|
||||||
if (
|
|
||||||
@$this->options['image_versions']['']['auto_orient'] &&
|
|
||||||
function_exists('exif_read_data') &&
|
|
||||||
($exif = @exif_read_data($uploaded_file)) &&
|
|
||||||
(((int) @$exif['Orientation']) >= 5)
|
|
||||||
) {
|
|
||||||
$tmp = $img_width;
|
|
||||||
$img_width = $img_height;
|
|
||||||
$img_height = $tmp;
|
|
||||||
unset($tmp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($img_width) && !empty($img_height)) {
|
|
||||||
if ($max_width && $img_width > $max_width) {
|
|
||||||
$file->error = $this->get_error_message('max_width');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ($max_height && $img_height > $max_height) {
|
|
||||||
$file->error = $this->get_error_message('max_height');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ($min_width && $img_width < $min_width) {
|
|
||||||
$file->error = $this->get_error_message('min_width');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if ($min_height && $img_height < $min_height) {
|
|
||||||
$file->error = $this->get_error_message('min_height');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -497,7 +508,7 @@ class UploadHandler
|
||||||
$name = $this->upcount_name($name);
|
$name = $this->upcount_name($name);
|
||||||
}
|
}
|
||||||
// Keep an existing filename if this is part of a chunked upload:
|
// Keep an existing filename if this is part of a chunked upload:
|
||||||
$uploaded_bytes = $this->fix_integer_overflow((int)$content_range[1]);
|
$uploaded_bytes = $this->fix_integer_overflow((int)@$content_range[1]);
|
||||||
while (is_file($this->get_upload_path($name))) {
|
while (is_file($this->get_upload_path($name))) {
|
||||||
if ($uploaded_bytes === $this->get_file_size(
|
if ($uploaded_bytes === $this->get_file_size(
|
||||||
$this->get_upload_path($name))) {
|
$this->get_upload_path($name))) {
|
||||||
|
@ -508,6 +519,17 @@ class UploadHandler
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function get_valid_image_extensions($file_path) {
|
||||||
|
switch ($this->imagetype($file_path)) {
|
||||||
|
case self::IMAGETYPE_JPEG:
|
||||||
|
return array('jpg', 'jpeg');
|
||||||
|
case self::IMAGETYPE_PNG:
|
||||||
|
return array('png');
|
||||||
|
case self::IMAGETYPE_GIF:
|
||||||
|
return array('gif');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function fix_file_extension($file_path, $name, $size, $type, $error,
|
protected function fix_file_extension($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
// Add missing file extension for known image types:
|
// Add missing file extension for known image types:
|
||||||
|
@ -516,17 +538,7 @@ class UploadHandler
|
||||||
$name .= '.'.$matches[1];
|
$name .= '.'.$matches[1];
|
||||||
}
|
}
|
||||||
if ($this->options['correct_image_extensions']) {
|
if ($this->options['correct_image_extensions']) {
|
||||||
switch ($this->imagetype($file_path)) {
|
$extensions = $this->get_valid_image_extensions($file_path);
|
||||||
case self::IMAGETYPE_JPEG:
|
|
||||||
$extensions = array('jpg', 'jpeg');
|
|
||||||
break;
|
|
||||||
case self::IMAGETYPE_PNG:
|
|
||||||
$extensions = array('png');
|
|
||||||
break;
|
|
||||||
case self::IMAGETYPE_GIF:
|
|
||||||
$extensions = array('gif');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Adjust incorrect image file extensions:
|
// Adjust incorrect image file extensions:
|
||||||
if (!empty($extensions)) {
|
if (!empty($extensions)) {
|
||||||
$parts = explode('.', $name);
|
$parts = explode('.', $name);
|
||||||
|
@ -1094,12 +1106,13 @@ class UploadHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function is_valid_image_file($file_path) {
|
protected function is_valid_image_file($file_path) {
|
||||||
if (!preg_match('/\.(gif|jpe?g|png)$/i', $file_path)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return !!$this->imagetype($file_path);
|
return !!$this->imagetype($file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function has_image_file_extension($file_path) {
|
||||||
|
return !!preg_match('/\.(gif|jpe?g|png)$/i', $file_path);
|
||||||
|
}
|
||||||
|
|
||||||
protected function handle_image_file($file_path, $file) {
|
protected function handle_image_file($file_path, $file) {
|
||||||
$failed_versions = array();
|
$failed_versions = array();
|
||||||
foreach ($this->options['image_versions'] as $version => $options) {
|
foreach ($this->options['image_versions'] as $version => $options) {
|
||||||
|
@ -1118,7 +1131,7 @@ class UploadHandler
|
||||||
}
|
}
|
||||||
if (count($failed_versions)) {
|
if (count($failed_versions)) {
|
||||||
$file->error = $this->get_error_message('image_resize')
|
$file->error = $this->get_error_message('image_resize')
|
||||||
.' ('.implode($failed_versions, ', ').')';
|
.' ('.implode(', ', $failed_versions).')';
|
||||||
}
|
}
|
||||||
// Free memory:
|
// Free memory:
|
||||||
$this->destroy_image_object($file_path);
|
$this->destroy_image_object($file_path);
|
||||||
|
@ -1131,7 +1144,7 @@ class UploadHandler
|
||||||
$index, $content_range);
|
$index, $content_range);
|
||||||
$file->size = $this->fix_integer_overflow((int)$size);
|
$file->size = $this->fix_integer_overflow((int)$size);
|
||||||
$file->type = $type;
|
$file->type = $type;
|
||||||
if ($this->validate($uploaded_file, $file, $error, $index)) {
|
if ($this->validate($uploaded_file, $file, $error, $index, $content_range)) {
|
||||||
$this->handle_form_data($file, $index);
|
$this->handle_form_data($file, $index);
|
||||||
$upload_dir = $this->get_upload_path();
|
$upload_dir = $this->get_upload_path();
|
||||||
if (!is_dir($upload_dir)) {
|
if (!is_dir($upload_dir)) {
|
||||||
|
@ -1162,8 +1175,12 @@ class UploadHandler
|
||||||
$file_size = $this->get_file_size($file_path, $append_file);
|
$file_size = $this->get_file_size($file_path, $append_file);
|
||||||
if ($file_size === $file->size) {
|
if ($file_size === $file->size) {
|
||||||
$file->url = $this->get_download_url($file->name);
|
$file->url = $this->get_download_url($file->name);
|
||||||
if ($this->is_valid_image_file($file_path)) {
|
if ($this->has_image_file_extension($file->name)) {
|
||||||
$this->handle_image_file($file_path, $file);
|
if ($content_range && !$this->validate_image_file($file_path, $file, $error, $index)) {
|
||||||
|
unlink($file_path);
|
||||||
|
} else {
|
||||||
|
$this->handle_image_file($file_path, $file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$file->size = $file_size;
|
$file->size = $file_size;
|
||||||
|
@ -1249,11 +1266,11 @@ class UploadHandler
|
||||||
switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) {
|
switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) {
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
return 'image/jpeg';
|
return self::IMAGETYPE_JPEG;
|
||||||
case 'png':
|
case 'png':
|
||||||
return 'image/png';
|
return self::IMAGETYPE_PNG;
|
||||||
case 'gif':
|
case 'gif':
|
||||||
return 'image/gif';
|
return self::IMAGETYPE_GIF;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -1394,7 +1411,7 @@ class UploadHandler
|
||||||
$content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE');
|
$content_range_header = $this->get_server_var('HTTP_CONTENT_RANGE');
|
||||||
$content_range = $content_range_header ?
|
$content_range = $content_range_header ?
|
||||||
preg_split('/[^0-9]+/', $content_range_header) : null;
|
preg_split('/[^0-9]+/', $content_range_header) : null;
|
||||||
$size = $content_range ? $content_range[3] : null;
|
$size = @$content_range[3];
|
||||||
$files = array();
|
$files = array();
|
||||||
if ($upload) {
|
if ($upload) {
|
||||||
if (is_array($upload['tmp_name'])) {
|
if (is_array($upload['tmp_name'])) {
|
||||||
|
@ -1440,7 +1457,7 @@ class UploadHandler
|
||||||
$response = array();
|
$response = array();
|
||||||
foreach ($file_names as $file_name) {
|
foreach ($file_names as $file_name) {
|
||||||
$file_path = $this->get_upload_path($file_name);
|
$file_path = $this->get_upload_path($file_name);
|
||||||
$success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path);
|
$success = strlen($file_name) > 0 && $file_name[0] !== '.' && is_file($file_path) && unlink($file_path);
|
||||||
if ($success) {
|
if ($success) {
|
||||||
foreach ($this->options['image_versions'] as $version => $options) {
|
foreach ($this->options['image_versions'] as $version => $options) {
|
||||||
if (!empty($version)) {
|
if (!empty($version)) {
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
version: '2.3'
|
|
||||||
services:
|
|
||||||
apache:
|
|
||||||
build: ./
|
|
||||||
network_mode: bridge
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
volumes:
|
|
||||||
- "../../:/var/www/html"
|
|
|
@ -1,25 +1,49 @@
|
||||||
# To enable the Headers module, execute the following command and reload Apache:
|
# If you have not done so already, please first read SECURITY.md in the root
|
||||||
|
# directory of this project or online:
|
||||||
|
# https://github.com/blueimp/jQuery-File-Upload/blob/master/SECURITY.md
|
||||||
|
#
|
||||||
|
# The settings in this file require Apache to support configuration overrides
|
||||||
|
# in .htaccess files, which is disabled by default since Apache v2.3.9 and needs
|
||||||
|
# to be enabled for the directives in this file to have any effect, see also:
|
||||||
|
# https://httpd.apache.org/docs/current/mod/core.html#allowoverride
|
||||||
|
#
|
||||||
|
# If you have full control over the web server, it is preferrable to define the
|
||||||
|
# settings in the Apache configuration (e.g. /etc/apache2/apache2.conf) itself.
|
||||||
|
#
|
||||||
|
# Some of the directives require the Apache Headers module. If it is not
|
||||||
|
# already enabled, please execute the following command and reload Apache:
|
||||||
# sudo a2enmod headers
|
# sudo a2enmod headers
|
||||||
|
#
|
||||||
|
# Please note that the order of directives across configuration files matters,
|
||||||
|
# see also:
|
||||||
|
# https://httpd.apache.org/docs/current/sections.html#merging
|
||||||
|
|
||||||
# The following directives prevent the execution of script files
|
# The following directive matches all files and forces them to be handled as
|
||||||
# in the context of the website.
|
# static content, which prevents the server from parsing and executing files
|
||||||
# They also force the content-type application/octet-stream and
|
# that are associated with a dynamic runtime, e.g. PHP files.
|
||||||
# force browsers to display a download dialog for non-image files.
|
# It also forces their Content-Type header to "application/octet-stream" and
|
||||||
SetHandler default-handler
|
# adds a "Content-Disposition: attachment" header to force a download dialog,
|
||||||
ForceType application/octet-stream
|
# which prevents browsers from interpreting files in the context of the
|
||||||
Header set Content-Disposition attachment
|
# web server, e.g. HTML files containing JavaScript.
|
||||||
|
# Lastly it also prevents browsers from MIME-sniffing the Content-Type,
|
||||||
|
# preventing them from interpreting a file as a different Content-Type than
|
||||||
|
# the one sent by the webserver.
|
||||||
|
<FilesMatch ".*">
|
||||||
|
SetHandler default-handler
|
||||||
|
ForceType application/octet-stream
|
||||||
|
Header set Content-Disposition attachment
|
||||||
|
Header set X-Content-Type-Options nosniff
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
# The following unsets the forced type and Content-Disposition headers
|
# The following directive matches known image files and unsets the forced
|
||||||
# for known image files:
|
# Content-Type so they can be served with their original mime type.
|
||||||
<FilesMatch "(?i)\.(gif|jpe?g|png)$">
|
# It also unsets the Content-Disposition header to allow displaying them
|
||||||
|
# inline in the browser.
|
||||||
|
<FilesMatch ".+\.(?i:(gif|jpe?g|png))$">
|
||||||
ForceType none
|
ForceType none
|
||||||
Header unset Content-Disposition
|
Header unset Content-Disposition
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
# The following directive prevents browsers from MIME-sniffing the content-type.
|
|
||||||
# This is an important complement to the ForceType directive above:
|
|
||||||
Header set X-Content-Type-Options nosniff
|
|
||||||
|
|
||||||
# Uncomment the following lines to prevent unauthorized download of files:
|
# Uncomment the following lines to prevent unauthorized download of files:
|
||||||
#AuthName "Authorization required"
|
#AuthName "Authorization required"
|
||||||
#AuthType Basic
|
#AuthType Basic
|
||||||
|
|
5
vendor/blueimp/jquery-file-upload/server/php/php.ini
vendored
Normal file
5
vendor/blueimp/jquery-file-upload/server/php/php.ini
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
max_execution_time = 300
|
||||||
|
memory_limit = 500M
|
||||||
|
post_max_size = 4G
|
||||||
|
upload_max_filesize = 4G
|
||||||
|
max_file_uploads = 50
|
195
vendor/blueimp/jquery-file-upload/test/index.html
vendored
195
vendor/blueimp/jquery-file-upload/test/index.html
vendored
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
/*
|
/*
|
||||||
* jQuery File Upload Plugin Test
|
* jQuery File Upload Test
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
* https://github.com/blueimp/jQuery-File-Upload
|
||||||
*
|
*
|
||||||
* Copyright 2010, Sebastian Tschan
|
* Copyright 2010, Sebastian Tschan
|
||||||
|
@ -12,161 +12,38 @@
|
||||||
*/
|
*/
|
||||||
-->
|
-->
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
<meta charset="utf-8" />
|
||||||
<!--[if IE]>
|
<title>jQuery File Upload Test</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<![endif]-->
|
<link rel="stylesheet" href="vendor/mocha.css" />
|
||||||
<meta charset="utf-8">
|
</head>
|
||||||
<title>jQuery File Upload Plugin Test</title>
|
<body>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<div id="mocha"></div>
|
||||||
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-1.23.1.css" integrity="sha384-RW07PgMHO3eNYL7ddFK/okEi1rjvSeJ3Ck/TxGUHkmzSlGmw4R9/KGJYUD3OicMd" crossorigin="anonymous">
|
<script src="vendor/mocha.js"></script>
|
||||||
</head>
|
<script src="vendor/chai.js"></script>
|
||||||
<body>
|
<script>
|
||||||
<h1 id="qunit-header">jQuery File Upload Plugin Test</h1>
|
mocha.setup('bdd');
|
||||||
<h2 id="qunit-banner"></h2>
|
</script>
|
||||||
<div id="qunit-testrunner-toolbar"></div>
|
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
||||||
<h2 id="qunit-userAgent"></h2>
|
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
||||||
<ol id="qunit-tests"></ol>
|
<script
|
||||||
<div id="qunit-fixture">
|
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
|
||||||
<!-- The file upload form used as target for the file upload widget -->
|
integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
|
||||||
<form id="fileupload" action="../server/php/" method="POST" enctype="multipart/form-data">
|
crossorigin="anonymous"
|
||||||
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
></script>
|
||||||
<div class="row fileupload-buttonbar">
|
<script src="../js/vendor/jquery.ui.widget.js"></script>
|
||||||
<div class="col-lg-7">
|
<script src="../js/jquery.iframe-transport.js"></script>
|
||||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
<script src="../js/jquery.fileupload.js"></script>
|
||||||
<span class="btn btn-success fileinput-button">
|
<script src="../js/jquery.fileupload-process.js"></script>
|
||||||
<i class="icon-plus icon-white"></i>
|
<script src="../js/jquery.fileupload-image.js"></script>
|
||||||
<span>Add files...</span>
|
<script src="../js/jquery.fileupload-audio.js"></script>
|
||||||
<input type="file" name="files[]" multiple>
|
<script src="../js/jquery.fileupload-video.js"></script>
|
||||||
</span>
|
<script src="../js/jquery.fileupload-validate.js"></script>
|
||||||
<button type="submit" class="btn btn-primary start">
|
<script src="unit.js"></script>
|
||||||
<i class="icon-upload icon-white"></i>
|
<script>
|
||||||
<span>Start upload</span>
|
mocha.checkLeaks();
|
||||||
</button>
|
mocha.run();
|
||||||
<button type="reset" class="btn btn-warning cancel">
|
</script>
|
||||||
<i class="icon-ban-circle icon-white"></i>
|
</body>
|
||||||
<span>Cancel upload</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="btn btn-danger delete">
|
|
||||||
<i class="icon-trash icon-white"></i>
|
|
||||||
<span>Delete</span>
|
|
||||||
</button>
|
|
||||||
<input type="checkbox" class="toggle">
|
|
||||||
<!-- The global file processing state -->
|
|
||||||
<span class="fileupload-process"></span>
|
|
||||||
</div>
|
|
||||||
<!-- The global progress state -->
|
|
||||||
<div class="col-lg-5 fileupload-progress">
|
|
||||||
<!-- The global progress bar -->
|
|
||||||
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
||||||
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
|
|
||||||
</div>
|
|
||||||
<!-- The extended global progress state -->
|
|
||||||
<div class="progress-extended"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- The table listing the files available for upload/download -->
|
|
||||||
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<!-- The template to display files available for upload -->
|
|
||||||
<script id="template-upload" type="text/x-tmpl">
|
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
||||||
<tr class="template-upload">
|
|
||||||
<td>
|
|
||||||
<span class="preview"></span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="name">{%=file.name%}</p>
|
|
||||||
<strong class="error text-danger"></strong>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="size">Processing...</p>
|
|
||||||
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if (!i && !o.options.autoUpload) { %}
|
|
||||||
<button class="btn btn-primary start" disabled>
|
|
||||||
<i class="glyphicon glyphicon-upload"></i>
|
|
||||||
<span>Start</span>
|
|
||||||
</button>
|
|
||||||
{% } %}
|
|
||||||
{% if (!i) { %}
|
|
||||||
<button class="btn btn-warning cancel">
|
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
|
||||||
<span>Cancel</span>
|
|
||||||
</button>
|
|
||||||
{% } %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% } %}
|
|
||||||
</script>
|
|
||||||
<!-- The template to display files available for download -->
|
|
||||||
<script id="template-download" type="text/x-tmpl">
|
|
||||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
||||||
<tr class="template-download">
|
|
||||||
<td>
|
|
||||||
<span class="preview">
|
|
||||||
{% if (file.thumbnailUrl) { %}
|
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
|
|
||||||
{% } %}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p class="name">
|
|
||||||
{% if (file.url) { %}
|
|
||||||
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
|
|
||||||
{% } else { %}
|
|
||||||
<span>{%=file.name%}</span>
|
|
||||||
{% } %}
|
|
||||||
</p>
|
|
||||||
{% if (file.error) { %}
|
|
||||||
<div><span class="label label-danger">Error</span> {%=file.error%}</div>
|
|
||||||
{% } %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="size">{%=o.formatFileSize(file.size)%}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if (file.deleteUrl) { %}
|
|
||||||
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
|
|
||||||
<i class="glyphicon glyphicon-trash"></i>
|
|
||||||
<span>Delete</span>
|
|
||||||
</button>
|
|
||||||
<input type="checkbox" name="delete" value="1" class="toggle">
|
|
||||||
{% } else { %}
|
|
||||||
<button class="btn btn-warning cancel">
|
|
||||||
<i class="glyphicon glyphicon-ban-circle"></i>
|
|
||||||
<span>Cancel</span>
|
|
||||||
</button>
|
|
||||||
{% } %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% } %}
|
|
||||||
</script>
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
|
|
||||||
<script src="../js/vendor/jquery.ui.widget.js"></script>
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
|
|
||||||
<script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
|
|
||||||
<script src="../js/jquery.iframe-transport.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload.js"></script>
|
|
||||||
<script>
|
|
||||||
/* global window, $ */
|
|
||||||
window.testBasicWidget = $.blueimp.fileupload;
|
|
||||||
</script>
|
|
||||||
<script src="../js/jquery.fileupload-process.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload-image.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload-audio.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload-video.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload-validate.js"></script>
|
|
||||||
<script src="../js/jquery.fileupload-ui.js"></script>
|
|
||||||
<script>
|
|
||||||
/* global window, $ */
|
|
||||||
window.testUIWidget = $.blueimp.fileupload;
|
|
||||||
</script>
|
|
||||||
<script src="https://code.jquery.com/qunit/qunit-1.23.1.js" integrity="sha384-FJbPWND3tHbuhP8PhCp3Kn0bEtCxaIq+sfkmiJ+Su0jchKFnVbPQTTyPiuwqbkXa" crossorigin="anonymous"></script>
|
|
||||||
<script src="test.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
1292
vendor/blueimp/jquery-file-upload/test/test.js
vendored
1292
vendor/blueimp/jquery-file-upload/test/test.js
vendored
File diff suppressed because it is too large
Load diff
989
vendor/blueimp/jquery-file-upload/test/unit.js
vendored
Normal file
989
vendor/blueimp/jquery-file-upload/test/unit.js
vendored
Normal file
|
@ -0,0 +1,989 @@
|
||||||
|
/*
|
||||||
|
* jQuery File Upload Test
|
||||||
|
* https://github.com/blueimp/JavaScript-Load-Image
|
||||||
|
*
|
||||||
|
* Copyright 2010, Sebastian Tschan
|
||||||
|
* https://blueimp.net
|
||||||
|
*
|
||||||
|
* Licensed under the MIT license:
|
||||||
|
* https://opensource.org/licenses/MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* global beforeEach, afterEach, describe, it */
|
||||||
|
/* eslint-disable new-cap */
|
||||||
|
|
||||||
|
(function (expect, $) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var canCreateBlob = !!window.dataURLtoBlob;
|
||||||
|
// 80x60px GIF image (color black, base64 data):
|
||||||
|
var b64DataGIF =
|
||||||
|
'R0lGODdhUAA8AIABAAAAAP///ywAAAAAUAA8AAACS4SPqcvtD6' +
|
||||||
|
'OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+s73/g8MCofE' +
|
||||||
|
'ovGITCqXzKbzCY1Kp9Sq9YrNarfcrvcLDovH5PKsAAA7';
|
||||||
|
var imageUrlGIF = 'data:image/gif;base64,' + b64DataGIF;
|
||||||
|
var blobGIF = canCreateBlob && window.dataURLtoBlob(imageUrlGIF);
|
||||||
|
|
||||||
|
// 2x1px JPEG (color white, with the Exif orientation flag set to 6 and the
|
||||||
|
// IPTC ObjectName (2:5) set to 'objectname'):
|
||||||
|
var b64DataJPEG =
|
||||||
|
'/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAA' +
|
||||||
|
'BgASAAAAAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAA8cAgUACm9iamVj' +
|
||||||
|
'dG5hbWUA/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB' +
|
||||||
|
'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEB' +
|
||||||
|
'AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB' +
|
||||||
|
'/8AAEQgAAQACAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYH' +
|
||||||
|
'CAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGh' +
|
||||||
|
'CCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldY' +
|
||||||
|
'WVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1' +
|
||||||
|
'tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8B' +
|
||||||
|
'AAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAEC' +
|
||||||
|
'dwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBka' +
|
||||||
|
'JicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWG' +
|
||||||
|
'h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ' +
|
||||||
|
'2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A/v4ooooA/9k=';
|
||||||
|
var imageUrlJPEG = 'data:image/jpeg;base64,' + b64DataJPEG;
|
||||||
|
var blobJPEG = canCreateBlob && window.dataURLtoBlob(imageUrlJPEG);
|
||||||
|
|
||||||
|
var fileGIF, fileJPEG, files, items, eventObject;
|
||||||
|
|
||||||
|
var uploadURL = '../server/php/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a fileupload form and adds it to the DOM
|
||||||
|
*
|
||||||
|
* @returns {object} jQuery node
|
||||||
|
*/
|
||||||
|
function createFileuploadForm() {
|
||||||
|
return $('<form><input type="file" name="files[]" multiple></form>')
|
||||||
|
.prop({
|
||||||
|
action: uploadURL,
|
||||||
|
method: 'POST',
|
||||||
|
enctype: 'multipart/form-data'
|
||||||
|
})
|
||||||
|
.css({ display: 'none' })
|
||||||
|
.appendTo(document.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes all files from the upload server
|
||||||
|
*
|
||||||
|
* @param {Array} files Response files list
|
||||||
|
* @param {Function} callback Callback function
|
||||||
|
*/
|
||||||
|
function deleteFiles(files, callback) {
|
||||||
|
$.when(
|
||||||
|
files.map(function (file) {
|
||||||
|
return $.ajax({
|
||||||
|
type: file.deleteType,
|
||||||
|
url: file.deleteUrl
|
||||||
|
});
|
||||||
|
})
|
||||||
|
).always(function () {
|
||||||
|
callback();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
fileGIF = new File([blobGIF], 'example.gif', { type: 'image/gif' });
|
||||||
|
fileJPEG = new File([blobJPEG], 'example.jpg', { type: 'image/jpeg' });
|
||||||
|
files = [fileGIF, fileJPEG];
|
||||||
|
items = [
|
||||||
|
{
|
||||||
|
getAsFile: function () {
|
||||||
|
return files[0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
getAsFile: function () {
|
||||||
|
return files[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
eventObject = {
|
||||||
|
originalEvent: {
|
||||||
|
dataTransfer: { files: files, types: ['Files'] },
|
||||||
|
clipboardData: { items: items }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function (done) {
|
||||||
|
$.getJSON(uploadURL).then(function (result) {
|
||||||
|
deleteFiles(result.files, done);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Initialization', function () {
|
||||||
|
var form;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
form = createFileuploadForm();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
form.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('widget', function () {
|
||||||
|
form.fileupload();
|
||||||
|
expect(form.data('blueimp-fileupload')).to.be.an('object');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('file input', function () {
|
||||||
|
form.fileupload();
|
||||||
|
expect(form.fileupload('option', 'fileInput').length).to.equal(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('drop zone', function () {
|
||||||
|
form.fileupload();
|
||||||
|
expect(form.fileupload('option', 'dropZone').length).to.equal(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('paste zone', function () {
|
||||||
|
form.fileupload({ pasteZone: document });
|
||||||
|
expect(form.fileupload('option', 'pasteZone').length).to.equal(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('data attributes', function () {
|
||||||
|
form.attr('data-url', 'https://example.org');
|
||||||
|
form.fileupload();
|
||||||
|
expect(form.fileupload('option', 'url')).to.equal('https://example.org');
|
||||||
|
expect(form.data('blueimp-fileupload')).to.be.an('object');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('event listeners', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload({
|
||||||
|
autoUpload: false,
|
||||||
|
pasteZone: document,
|
||||||
|
dragover: function () {
|
||||||
|
eventsData.dragover = true;
|
||||||
|
},
|
||||||
|
dragenter: function () {
|
||||||
|
eventsData.dragenter = true;
|
||||||
|
},
|
||||||
|
dragleave: function () {
|
||||||
|
eventsData.dragleave = true;
|
||||||
|
},
|
||||||
|
drop: function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
},
|
||||||
|
paste: function (e, data) {
|
||||||
|
eventsData.paste = data;
|
||||||
|
},
|
||||||
|
change: function () {
|
||||||
|
eventsData.change = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'fileInput')
|
||||||
|
.trigger($.Event('change', eventObject));
|
||||||
|
expect(eventsData.change).to.equal(true);
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragover', eventObject))
|
||||||
|
.trigger($.Event('dragenter', eventObject))
|
||||||
|
.trigger($.Event('dragleave', eventObject))
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.dragover).to.equal(true);
|
||||||
|
expect(eventsData.dragenter).to.equal(true);
|
||||||
|
expect(eventsData.dragleave).to.equal(true);
|
||||||
|
expect(eventsData.drop.files).to.deep.equal(files);
|
||||||
|
form
|
||||||
|
.fileupload('option', 'pasteZone')
|
||||||
|
.trigger($.Event('paste', eventObject));
|
||||||
|
expect(eventsData.paste.files).to.deep.equal(files);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('API', function () {
|
||||||
|
var form;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
form = createFileuploadForm().fileupload({
|
||||||
|
dataType: 'json',
|
||||||
|
autoUpload: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
form.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('destroy', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
pasteZone: document,
|
||||||
|
dragover: function () {
|
||||||
|
eventsData.dragover = true;
|
||||||
|
},
|
||||||
|
dragenter: function () {
|
||||||
|
eventsData.dragenter = true;
|
||||||
|
},
|
||||||
|
dragleave: function () {
|
||||||
|
eventsData.dragleave = true;
|
||||||
|
},
|
||||||
|
drop: function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
},
|
||||||
|
paste: function (e, data) {
|
||||||
|
eventsData.paste = data;
|
||||||
|
},
|
||||||
|
change: function () {
|
||||||
|
eventsData.change = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
var fileInput = form.fileupload('option', 'fileInput');
|
||||||
|
var dropZone = form.fileupload('option', 'dropZone');
|
||||||
|
var pasteZone = form.fileupload('option', 'pasteZone');
|
||||||
|
form.fileupload('destroy');
|
||||||
|
expect(form.data('blueimp-fileupload')).to.equal();
|
||||||
|
fileInput.trigger($.Event('change', eventObject));
|
||||||
|
expect(eventsData.change).to.equal();
|
||||||
|
dropZone
|
||||||
|
.trigger($.Event('dragover', eventObject))
|
||||||
|
.trigger($.Event('dragenter', eventObject))
|
||||||
|
.trigger($.Event('dragleave', eventObject))
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.dragover).to.equal();
|
||||||
|
expect(eventsData.dragenter).to.equal();
|
||||||
|
expect(eventsData.dragleave).to.equal();
|
||||||
|
expect(eventsData.drop).to.equal();
|
||||||
|
pasteZone.trigger($.Event('paste', eventObject));
|
||||||
|
expect(eventsData.paste).to.equal();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('disable', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
pasteZone: document,
|
||||||
|
dragover: function () {
|
||||||
|
eventsData.dragover = true;
|
||||||
|
},
|
||||||
|
dragenter: function () {
|
||||||
|
eventsData.dragenter = true;
|
||||||
|
},
|
||||||
|
dragleave: function () {
|
||||||
|
eventsData.dragleave = true;
|
||||||
|
},
|
||||||
|
drop: function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
},
|
||||||
|
paste: function (e, data) {
|
||||||
|
eventsData.paste = data;
|
||||||
|
},
|
||||||
|
change: function () {
|
||||||
|
eventsData.change = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('disable');
|
||||||
|
form
|
||||||
|
.fileupload('option', 'fileInput')
|
||||||
|
.trigger($.Event('change', eventObject));
|
||||||
|
expect(eventsData.change).to.equal();
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragover', eventObject))
|
||||||
|
.trigger($.Event('dragenter', eventObject))
|
||||||
|
.trigger($.Event('dragleave', eventObject))
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.dragover).to.equal();
|
||||||
|
expect(eventsData.dragenter).to.equal();
|
||||||
|
expect(eventsData.dragleave).to.equal();
|
||||||
|
expect(eventsData.drop).to.equal();
|
||||||
|
form
|
||||||
|
.fileupload('option', 'pasteZone')
|
||||||
|
.trigger($.Event('paste', eventObject));
|
||||||
|
expect(eventsData.paste).to.equal();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('enable', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
pasteZone: document,
|
||||||
|
dragover: function () {
|
||||||
|
eventsData.dragover = true;
|
||||||
|
},
|
||||||
|
dragenter: function () {
|
||||||
|
eventsData.dragenter = true;
|
||||||
|
},
|
||||||
|
dragleave: function () {
|
||||||
|
eventsData.dragleave = true;
|
||||||
|
},
|
||||||
|
drop: function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
},
|
||||||
|
paste: function (e, data) {
|
||||||
|
eventsData.paste = data;
|
||||||
|
},
|
||||||
|
change: function () {
|
||||||
|
eventsData.change = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('disable');
|
||||||
|
form.fileupload('enable');
|
||||||
|
form
|
||||||
|
.fileupload('option', 'fileInput')
|
||||||
|
.trigger($.Event('change', eventObject));
|
||||||
|
expect(eventsData.change).to.equal(true);
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragover', eventObject))
|
||||||
|
.trigger($.Event('dragenter', eventObject))
|
||||||
|
.trigger($.Event('dragleave', eventObject))
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.dragover).to.equal(true);
|
||||||
|
expect(eventsData.dragenter).to.equal(true);
|
||||||
|
expect(eventsData.dragleave).to.equal(true);
|
||||||
|
expect(eventsData.drop.files).to.deep.equal(files);
|
||||||
|
form
|
||||||
|
.fileupload('option', 'pasteZone')
|
||||||
|
.trigger($.Event('paste', eventObject));
|
||||||
|
expect(eventsData.paste.files).to.deep.equal(files);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('option', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', 'drop', function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
});
|
||||||
|
var dropZone = form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.drop.files).to.deep.equal(files);
|
||||||
|
delete eventsData.drop;
|
||||||
|
form.fileupload('option', 'dropZone', null);
|
||||||
|
dropZone.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.drop).to.equal();
|
||||||
|
form.fileupload('option', {
|
||||||
|
dropZone: dropZone
|
||||||
|
});
|
||||||
|
dropZone.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.drop.files).to.deep.equal(files);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('add', function () {
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', 'add', function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
expect(eventData.length).to.equal(2);
|
||||||
|
expect(eventData[0].files[0]).to.equal(files[0]);
|
||||||
|
expect(eventData[1].files[0]).to.equal(files[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('send', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
form.fileupload('send', { files: files }).complete(function (result) {
|
||||||
|
var uploadedFiles = result.responseJSON.files;
|
||||||
|
expect(uploadedFiles.length).to.equal(2);
|
||||||
|
expect(uploadedFiles[0].type).to.equal(files[0].type);
|
||||||
|
expect(uploadedFiles[0].error).to.equal();
|
||||||
|
expect(uploadedFiles[1].type).to.equal(files[1].type);
|
||||||
|
expect(uploadedFiles[1].error).to.equal();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Callbacks', function () {
|
||||||
|
var form;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
form = createFileuploadForm().fileupload({ dataType: 'json' });
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
form.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('add', function () {
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', 'add', function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
expect(eventData.length).to.equal(2);
|
||||||
|
expect(eventData[0].files[0]).to.equal(files[0]);
|
||||||
|
expect(eventData[1].files[0]).to.equal(files[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('submit', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', {
|
||||||
|
submit: function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (eventData.length < 2) return;
|
||||||
|
expect(eventData[0].files[0]).to.equal(files[0]);
|
||||||
|
expect(eventData[1].files[0]).to.equal(files[1]);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('send', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', {
|
||||||
|
send: function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
expect(eventData.length).to.equal(1);
|
||||||
|
expect(eventData[0].files).to.deep.equal(files);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('send', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('done', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', {
|
||||||
|
done: function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (eventData.length < 2) return;
|
||||||
|
expect(eventData[0].result.files.length).to.equal(1);
|
||||||
|
expect(eventData[1].result.files.length).to.equal(1);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('fail', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', {
|
||||||
|
url: uploadURL + '404',
|
||||||
|
fail: function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (eventData.length < 2) return;
|
||||||
|
expect(eventData[0].result).to.equal();
|
||||||
|
expect(eventData[1].result).to.equal();
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('always', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var eventData = [];
|
||||||
|
form.fileupload('option', {
|
||||||
|
always: function (e, data) {
|
||||||
|
eventData.push(data);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (eventData.length < 2) {
|
||||||
|
expect(eventData[0].result).to.equal();
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
expect(eventData[1].result.files.length).to.equal(1);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF], url: uploadURL + '404' });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('progress', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var loaded;
|
||||||
|
var total;
|
||||||
|
form.fileupload('option', {
|
||||||
|
progress: function (e, data) {
|
||||||
|
loaded = data.loaded;
|
||||||
|
total = data.total;
|
||||||
|
expect(loaded).to.be.at.most(total);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
expect(loaded).to.equal(total);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('progressall', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var loaded;
|
||||||
|
var total;
|
||||||
|
var completed = 0;
|
||||||
|
form.fileupload('option', {
|
||||||
|
progressall: function (e, data) {
|
||||||
|
loaded = data.loaded;
|
||||||
|
total = data.total;
|
||||||
|
expect(loaded).to.be.at.most(total);
|
||||||
|
},
|
||||||
|
always: function () {
|
||||||
|
completed++;
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (completed < 2) return;
|
||||||
|
expect(loaded).to.equal(total);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('start', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
var started;
|
||||||
|
form.fileupload('option', {
|
||||||
|
start: function () {
|
||||||
|
started = true;
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
expect(started).to.equal(true);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('stop', function (done) {
|
||||||
|
this.slow(200);
|
||||||
|
form.fileupload('option', {
|
||||||
|
stop: function () {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('dragover', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
dragover: function () {
|
||||||
|
eventsData.dragover = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragover', eventObject));
|
||||||
|
expect(eventsData.dragover).to.equal(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('dragenter', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
dragenter: function () {
|
||||||
|
eventsData.dragenter = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragenter', eventObject));
|
||||||
|
expect(eventsData.dragenter).to.equal(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('dragleave', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
dragleave: function () {
|
||||||
|
eventsData.dragleave = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('dragleave', eventObject));
|
||||||
|
expect(eventsData.dragleave).to.equal(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('drop', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
drop: function (e, data) {
|
||||||
|
eventsData.drop = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'dropZone')
|
||||||
|
.trigger($.Event('drop', eventObject));
|
||||||
|
expect(eventsData.drop.files).to.deep.equal(files);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('paste', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
pasteZone: document,
|
||||||
|
paste: function (e, data) {
|
||||||
|
eventsData.paste = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'pasteZone')
|
||||||
|
.trigger($.Event('paste', eventObject));
|
||||||
|
expect(eventsData.paste.files).to.deep.equal(files);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('change', function () {
|
||||||
|
var eventsData = {};
|
||||||
|
form.fileupload('option', {
|
||||||
|
autoUpload: false,
|
||||||
|
change: function () {
|
||||||
|
eventsData.change = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form
|
||||||
|
.fileupload('option', 'fileInput')
|
||||||
|
.trigger($.Event('change', eventObject));
|
||||||
|
expect(eventsData.change).to.equal(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Options', function () {
|
||||||
|
var form;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
form = createFileuploadForm();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function () {
|
||||||
|
form.remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('paramName', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.paramName[0]).to.equal(
|
||||||
|
form.fileupload('option', 'fileInput').prop('name')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('url', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.url).to.equal(form.prop('action'));
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('type', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
type: 'PUT',
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.type).to.equal('PUT');
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('replaceFileInput', function () {
|
||||||
|
form.fileupload();
|
||||||
|
var fileInput = form.fileupload('option', 'fileInput');
|
||||||
|
fileInput.trigger($.Event('change', eventObject));
|
||||||
|
expect(form.fileupload('option', 'fileInput')[0]).to.not.equal(
|
||||||
|
fileInput[0]
|
||||||
|
);
|
||||||
|
form.fileupload('option', 'replaceFileInput', false);
|
||||||
|
fileInput = form.fileupload('option', 'fileInput');
|
||||||
|
fileInput.trigger($.Event('change', eventObject));
|
||||||
|
expect(form.fileupload('option', 'fileInput')[0]).to.equal(fileInput[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('forceIframeTransport', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
forceIframeTransport: 'PUT',
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.dataType.substr(0, 6)).to.equal('iframe');
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('singleFileUploads', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
singleFileUploads: false,
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.files).to.deep.equal(files);
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('limitMultiFileUploads', function (done) {
|
||||||
|
var completed = 0;
|
||||||
|
form.fileupload({
|
||||||
|
singleFileUploads: false,
|
||||||
|
limitMultiFileUploads: 2,
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.files).to.deep.equal(files);
|
||||||
|
completed++;
|
||||||
|
if (completed < 2) return;
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files.concat(files) });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('limitMultiFileUploadSize', function (done) {
|
||||||
|
var completed = 0;
|
||||||
|
form.fileupload({
|
||||||
|
singleFileUploads: false,
|
||||||
|
limitMultiFileUploadSize: files[0].size + files[1].size,
|
||||||
|
limitMultiFileUploadSizeOverhead: 0,
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.files).to.deep.equal(files);
|
||||||
|
completed++;
|
||||||
|
if (completed < 2) return;
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files.concat(files) });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('sequentialUploads', function (done) {
|
||||||
|
this.slow(400);
|
||||||
|
var completed = 0;
|
||||||
|
var events = [];
|
||||||
|
form.fileupload({
|
||||||
|
sequentialUploads: true,
|
||||||
|
dataType: 'json',
|
||||||
|
send: function () {
|
||||||
|
events.push('send');
|
||||||
|
},
|
||||||
|
always: function () {
|
||||||
|
events.push('complete');
|
||||||
|
completed++;
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (completed === 4) {
|
||||||
|
expect(events.join(',')).to.equal(
|
||||||
|
[
|
||||||
|
'send',
|
||||||
|
'complete',
|
||||||
|
'send',
|
||||||
|
'complete',
|
||||||
|
'send',
|
||||||
|
'complete',
|
||||||
|
'send',
|
||||||
|
'complete'
|
||||||
|
].join(',')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files.concat(files) });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('limitConcurrentUploads', function (done) {
|
||||||
|
this.slow(800);
|
||||||
|
var completed = 0;
|
||||||
|
var loadCount = 0;
|
||||||
|
form.fileupload({
|
||||||
|
limitConcurrentUploads: 2,
|
||||||
|
dataType: 'json',
|
||||||
|
send: function () {
|
||||||
|
loadCount++;
|
||||||
|
expect(loadCount).to.be.at.most(2);
|
||||||
|
},
|
||||||
|
always: function () {
|
||||||
|
completed++;
|
||||||
|
loadCount--;
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
if (completed === 8) {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', {
|
||||||
|
files: files.concat(files).concat(files).concat(files)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('multipart', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
multipart: false,
|
||||||
|
send: function (e, data) {
|
||||||
|
expect(data.contentType).to.equal(fileGIF.type);
|
||||||
|
expect(data.headers['Content-Disposition']).to.equal(
|
||||||
|
'attachment; filename="' + fileGIF.name + '"'
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uniqueFilenames', function (done) {
|
||||||
|
form.fileupload({
|
||||||
|
uniqueFilenames: {},
|
||||||
|
send: function (e, data) {
|
||||||
|
var formFiles = data.data.getAll('files[]');
|
||||||
|
expect(formFiles[0].name).to.equal(fileGIF.name);
|
||||||
|
expect(formFiles[1].name).to.equal(
|
||||||
|
fileGIF.name.replace('.gif', ' (1).gif')
|
||||||
|
);
|
||||||
|
expect(formFiles[2].name).to.equal(
|
||||||
|
fileGIF.name.replace('.gif', ' (2).gif')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('send', { files: [fileGIF, fileGIF, fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('maxChunkSize', function (done) {
|
||||||
|
this.slow(400);
|
||||||
|
var events = [];
|
||||||
|
form.fileupload({
|
||||||
|
maxChunkSize: 32,
|
||||||
|
dataType: 'json',
|
||||||
|
chunkbeforesend: function () {
|
||||||
|
events.push('chunkbeforesend');
|
||||||
|
},
|
||||||
|
chunksend: function () {
|
||||||
|
events.push('chunksend');
|
||||||
|
},
|
||||||
|
chunkdone: function () {
|
||||||
|
events.push('chunkdone');
|
||||||
|
},
|
||||||
|
done: function (e, data) {
|
||||||
|
var uploadedFile = data.result.files[0];
|
||||||
|
expect(uploadedFile.type).to.equal(fileGIF.type);
|
||||||
|
expect(uploadedFile.size).to.equal(fileGIF.size);
|
||||||
|
},
|
||||||
|
stop: function () {
|
||||||
|
expect(events.join(',')).to.equal(
|
||||||
|
[
|
||||||
|
'chunkbeforesend',
|
||||||
|
'chunksend',
|
||||||
|
'chunkdone',
|
||||||
|
'chunkbeforesend',
|
||||||
|
'chunksend',
|
||||||
|
'chunkdone',
|
||||||
|
'chunkbeforesend',
|
||||||
|
'chunksend',
|
||||||
|
'chunkdone',
|
||||||
|
'chunkbeforesend',
|
||||||
|
'chunksend',
|
||||||
|
'chunkdone'
|
||||||
|
].join(',')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('send', { files: [fileGIF] });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('acceptFileTypes', function (done) {
|
||||||
|
var processData;
|
||||||
|
form.fileupload({
|
||||||
|
acceptFileTypes: /^image\/gif$/,
|
||||||
|
singleFileUploads: false,
|
||||||
|
processalways: function (e, data) {
|
||||||
|
processData = data;
|
||||||
|
},
|
||||||
|
processstop: function () {
|
||||||
|
expect(processData.files[0].error).to.equal();
|
||||||
|
expect(processData.files[1].error).to.equal(
|
||||||
|
form.fileupload('option').i18n('acceptFileTypes')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('maxFileSize', function (done) {
|
||||||
|
var processData;
|
||||||
|
form.fileupload({
|
||||||
|
maxFileSize: 200,
|
||||||
|
singleFileUploads: false,
|
||||||
|
processalways: function (e, data) {
|
||||||
|
processData = data;
|
||||||
|
},
|
||||||
|
processstop: function () {
|
||||||
|
expect(processData.files[0].error).to.equal();
|
||||||
|
expect(processData.files[1].error).to.equal(
|
||||||
|
form.fileupload('option').i18n('maxFileSize')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('minFileSize', function (done) {
|
||||||
|
var processData;
|
||||||
|
form.fileupload({
|
||||||
|
minFileSize: 200,
|
||||||
|
singleFileUploads: false,
|
||||||
|
processalways: function (e, data) {
|
||||||
|
processData = data;
|
||||||
|
},
|
||||||
|
processstop: function () {
|
||||||
|
expect(processData.files[0].error).to.equal(
|
||||||
|
form.fileupload('option').i18n('minFileSize')
|
||||||
|
);
|
||||||
|
expect(processData.files[1].error).to.equal();
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('maxNumberOfFiles', function (done) {
|
||||||
|
var processData;
|
||||||
|
form.fileupload({
|
||||||
|
maxNumberOfFiles: 2,
|
||||||
|
getNumberOfFiles: function () {
|
||||||
|
return 2;
|
||||||
|
},
|
||||||
|
singleFileUploads: false,
|
||||||
|
processalways: function (e, data) {
|
||||||
|
processData = data;
|
||||||
|
},
|
||||||
|
processstop: function () {
|
||||||
|
expect(processData.files[0].error).to.equal(
|
||||||
|
form.fileupload('option').i18n('maxNumberOfFiles')
|
||||||
|
);
|
||||||
|
expect(processData.files[1].error).to.equal(
|
||||||
|
form.fileupload('option').i18n('maxNumberOfFiles')
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
form.fileupload('add', { files: files });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})(this.chai.expect, this.jQuery);
|
10854
vendor/blueimp/jquery-file-upload/test/vendor/chai.js
vendored
Normal file
10854
vendor/blueimp/jquery-file-upload/test/vendor/chai.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
325
vendor/blueimp/jquery-file-upload/test/vendor/mocha.css
vendored
Normal file
325
vendor/blueimp/jquery-file-upload/test/vendor/mocha.css
vendored
Normal file
|
@ -0,0 +1,325 @@
|
||||||
|
@charset "utf-8";
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha {
|
||||||
|
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
margin: 60px 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha ul,
|
||||||
|
#mocha li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha h1,
|
||||||
|
#mocha h2 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha h1 {
|
||||||
|
margin-top: 15px;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha h1 a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha h1 a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .suite .suite h1 {
|
||||||
|
margin-top: 0;
|
||||||
|
font-size: .8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha h2 {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .suite {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test {
|
||||||
|
margin-left: 15px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pending:hover h2::after {
|
||||||
|
content: '(pending)';
|
||||||
|
font-family: arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pass.medium .duration {
|
||||||
|
background: #c09853;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pass.slow .duration {
|
||||||
|
background: #b94a48;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pass::before {
|
||||||
|
content: '✓';
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
|
color: #00d6b2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pass .duration {
|
||||||
|
font-size: 9px;
|
||||||
|
margin-left: 5px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #fff;
|
||||||
|
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||||
|
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||||
|
box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-ms-border-radius: 5px;
|
||||||
|
-o-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pass.fast .duration {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pending {
|
||||||
|
color: #0b97c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.pending::before {
|
||||||
|
content: '◦';
|
||||||
|
color: #0b97c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.fail {
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.fail pre {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test.fail::before {
|
||||||
|
content: '✖';
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin-right: 5px;
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test pre.error {
|
||||||
|
color: #c00;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test .html-error {
|
||||||
|
overflow: auto;
|
||||||
|
color: black;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
font: 12px/1.5 monaco, monospace;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
max-width: 85%; /*(1)*/
|
||||||
|
max-width: -webkit-calc(100% - 42px);
|
||||||
|
max-width: -moz-calc(100% - 42px);
|
||||||
|
max-width: calc(100% - 42px); /*(2)*/
|
||||||
|
max-height: 300px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
border-bottom-color: #ddd;
|
||||||
|
-webkit-box-shadow: 0 1px 3px #eee;
|
||||||
|
-moz-box-shadow: 0 1px 3px #eee;
|
||||||
|
box-shadow: 0 1px 3px #eee;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test .html-error pre.error {
|
||||||
|
border: none;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
-webkit-box-shadow: 0;
|
||||||
|
-moz-box-shadow: 0;
|
||||||
|
box-shadow: 0;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
margin-top: 18px;
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (1): approximate for browsers not supporting calc
|
||||||
|
* (2): 42 = 2*15 + 2*10 + 2*1 (padding + margin + border)
|
||||||
|
* ^^ seriously
|
||||||
|
*/
|
||||||
|
#mocha .test pre {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
font: 12px/1.5 monaco, monospace;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
max-width: 85%; /*(1)*/
|
||||||
|
max-width: -webkit-calc(100% - 42px);
|
||||||
|
max-width: -moz-calc(100% - 42px);
|
||||||
|
max-width: calc(100% - 42px); /*(2)*/
|
||||||
|
word-wrap: break-word;
|
||||||
|
border-bottom-color: #ddd;
|
||||||
|
-webkit-box-shadow: 0 1px 3px #eee;
|
||||||
|
-moz-box-shadow: 0 1px 3px #eee;
|
||||||
|
box-shadow: 0 1px 3px #eee;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test h2 {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test a.replay {
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
right: 0;
|
||||||
|
text-decoration: none;
|
||||||
|
vertical-align: middle;
|
||||||
|
display: block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
line-height: 15px;
|
||||||
|
text-align: center;
|
||||||
|
background: #eee;
|
||||||
|
font-size: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
-webkit-transition:opacity 200ms;
|
||||||
|
-moz-transition:opacity 200ms;
|
||||||
|
-o-transition:opacity 200ms;
|
||||||
|
transition: opacity 200ms;
|
||||||
|
opacity: 0.3;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha .test:hover a.replay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-report.pass .test.fail {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-report.fail .test.pass {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-report.pending .test.pass,
|
||||||
|
#mocha-report.pending .test.fail {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#mocha-report.pending .test.pass.pending {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-error {
|
||||||
|
color: #c00;
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: 100;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats {
|
||||||
|
position: fixed;
|
||||||
|
top: 15px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: 0;
|
||||||
|
color: #888;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats .progress {
|
||||||
|
float: right;
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set safe initial values, so mochas .progress does not inherit these
|
||||||
|
* properties from Bootstrap .progress (which causes .progress height to
|
||||||
|
* equal line height set in Bootstrap).
|
||||||
|
*/
|
||||||
|
height: auto;
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
-moz-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats em {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats a:hover {
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
list-style: none;
|
||||||
|
padding-top: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha-stats canvas {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha code .comment { color: #ddd; }
|
||||||
|
#mocha code .init { color: #2f6fad; }
|
||||||
|
#mocha code .string { color: #5890ad; }
|
||||||
|
#mocha code .keyword { color: #8a6343; }
|
||||||
|
#mocha code .number { color: #2f6fad; }
|
||||||
|
|
||||||
|
@media screen and (max-device-width: 480px) {
|
||||||
|
#mocha {
|
||||||
|
margin: 60px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mocha #stats {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
18178
vendor/blueimp/jquery-file-upload/test/vendor/mocha.js
vendored
Normal file
18178
vendor/blueimp/jquery-file-upload/test/vendor/mocha.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
vendor/blueimp/jquery-file-upload/wdio/.eslintrc.js
vendored
Normal file
10
vendor/blueimp/jquery-file-upload/wdio/.eslintrc.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2019
|
||||||
|
}
|
||||||
|
}
|
9
vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js
vendored
Normal file
9
vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
arrowParens: 'avoid',
|
||||||
|
proseWrap: 'always',
|
||||||
|
semi: false,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'none'
|
||||||
|
}
|
20
vendor/blueimp/jquery-file-upload/wdio/LICENSE.txt
vendored
Normal file
20
vendor/blueimp/jquery-file-upload/wdio/LICENSE.txt
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright © 2019 Sebastian Tschan, https://blueimp.net
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
BIN
vendor/blueimp/jquery-file-upload/wdio/assets/black+white-3x2.jpg
vendored
Normal file
BIN
vendor/blueimp/jquery-file-upload/wdio/assets/black+white-3x2.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 407 B |
BIN
vendor/blueimp/jquery-file-upload/wdio/assets/black+white-60x40.gif
vendored
Normal file
BIN
vendor/blueimp/jquery-file-upload/wdio/assets/black+white-60x40.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 B |
85
vendor/blueimp/jquery-file-upload/wdio/bin/forward-ports.sh
vendored
Executable file
85
vendor/blueimp/jquery-file-upload/wdio/bin/forward-ports.sh
vendored
Executable file
|
@ -0,0 +1,85 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Adds TCP/UDP port forwarding rules to the pf firewall (MacOS/BSD).
|
||||||
|
#
|
||||||
|
# Adds rules for both TCP and UDP in addition to those from /etc/pf.conf.
|
||||||
|
# Requires an existing rdr-anchor entry in /etc/pf.conf.
|
||||||
|
# Only adds rules temporarily, without changing any files.
|
||||||
|
#
|
||||||
|
# Usage: ./forward-ports.sh [[nic:]port=[ip:]port [...]]
|
||||||
|
#
|
||||||
|
# If no network interface is given, forwards from all interfaces.
|
||||||
|
# If no IP is given, forwards to 127.0.0.1.
|
||||||
|
# If no port forwarding rule is given, resets to the rules from /etc/pf.conf.
|
||||||
|
#
|
||||||
|
# e.g. forwarding ports 80 and 443 on network interface en0 to ports 8080 and
|
||||||
|
# 8443 on localhost respectively:
|
||||||
|
# ./forward-ports.sh en0:80=8080 en0:443=8443
|
||||||
|
#
|
||||||
|
# Copyright 2019, Sebastian Tschan
|
||||||
|
# https://blueimp.net
|
||||||
|
#
|
||||||
|
# Licensed under the MIT license:
|
||||||
|
# https://opensource.org/licenses/MIT
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
RULES=
|
||||||
|
NEWLINE='
|
||||||
|
'
|
||||||
|
|
||||||
|
print_usage_exit() {
|
||||||
|
if [ -n "$RULES" ]; then
|
||||||
|
printf '\nError in custom rules:\n%s\n' "$RULES" >&2
|
||||||
|
fi
|
||||||
|
echo "Usage: $0 [[nic:]port=[ip:]port [...]]" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
print_nat_rules() {
|
||||||
|
echo
|
||||||
|
echo 'Loaded NAT rules:'
|
||||||
|
sudo pfctl -s nat 2>/dev/null
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print usage and exit if option arguments like "-h" are used:
|
||||||
|
if [ "${1#-}" != "$1" ]; then print_usage_exit; fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
# Separate the from=to parts:
|
||||||
|
from=${1%=*}
|
||||||
|
to=${1#*=}
|
||||||
|
# If from part has a nic defined, extract it, else forward from all:
|
||||||
|
case "$from" in
|
||||||
|
*:*) nic="on ${from%:*}";;
|
||||||
|
*) nic=;;
|
||||||
|
esac
|
||||||
|
# Extract the port to forward from:
|
||||||
|
from_port=${from##*:}
|
||||||
|
# If to part has an IP defined, extract it, else forward to 127.0.0.1:
|
||||||
|
case "$to" in
|
||||||
|
*:*) to_ip=${to%:*};;
|
||||||
|
*) to_ip=127.0.0.1;;
|
||||||
|
esac
|
||||||
|
# Extract the port to forward to:
|
||||||
|
to_port=${to##*:}
|
||||||
|
# Create the packet filter (pf) forwarding rule for both TCP and UDP:
|
||||||
|
rule=$(
|
||||||
|
printf \
|
||||||
|
'rdr pass %s inet proto %s from any to any port %s -> %s port %s' \
|
||||||
|
"$nic" '{tcp udp}' "$from_port" "$to_ip" "$to_port"
|
||||||
|
)
|
||||||
|
# Add it to the list of rules:
|
||||||
|
RULES="$RULES$rule$NEWLINE"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add the rules after the line matching "rdr-anchor" in /etc/pf.conf, print the
|
||||||
|
# combined rules to STDOUT and load the rules into pf from STDIN.
|
||||||
|
# Finally, display the loaded NAT rules or print the script usage on failure:
|
||||||
|
# shellcheck disable=SC2015
|
||||||
|
printf %s "$RULES" | sed -e '/rdr-anchor/r /dev/stdin' /etc/pf.conf |
|
||||||
|
sudo pfctl -Ef - 2>/dev/null && print_nat_rules || print_usage_exit
|
43
vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh
vendored
Executable file
43
vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh
vendored
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$1" = -t ]; then
|
||||||
|
BIN='/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
BIN=safaridriver
|
||||||
|
fi
|
||||||
|
|
||||||
|
SCREEN='Capture screen'
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
OUTPUT=$(ffmpeg -f avfoundation -list_devices true -i - 2>&1 | grep "$SCREEN")
|
||||||
|
if [ "$(echo "$OUTPUT" | grep -c ^)" -gt 1 ]; then
|
||||||
|
echo 'Please select the input device by entering its [index] number:' >&2
|
||||||
|
echo "$OUTPUT" >&2
|
||||||
|
read -r INDEX
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
INDEX=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'Starting safaridriver on 127.0.0.1:4444 ...' >&2
|
||||||
|
"$BIN" -p 4444 & pid=$!
|
||||||
|
|
||||||
|
# shellcheck disable=SC2064
|
||||||
|
trap "kill $pid; exit" INT TERM
|
||||||
|
|
||||||
|
echo 'Starting mjpeg-server on 127.0.0.1:9000 ...' >&2
|
||||||
|
mjpeg-server -a 127.0.0.1:9000 -- ffmpeg \
|
||||||
|
-loglevel error \
|
||||||
|
-probesize 32 \
|
||||||
|
-fpsprobesize 0 \
|
||||||
|
-analyzeduration 0 \
|
||||||
|
-fflags nobuffer \
|
||||||
|
-f avfoundation \
|
||||||
|
-capture_cursor 1 \
|
||||||
|
-r "${FPS:-15}" \
|
||||||
|
-pixel_format yuyv422 \
|
||||||
|
-i "${INDEX:-$SCREEN}" \
|
||||||
|
-f mpjpeg \
|
||||||
|
-q "${QUALITY:-2}" \
|
||||||
|
-
|
40
vendor/blueimp/jquery-file-upload/wdio/conf/chrome.js
vendored
Normal file
40
vendor/blueimp/jquery-file-upload/wdio/conf/chrome.js
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.Config */
|
||||||
|
const config = {
|
||||||
|
hostname: 'chromedriver',
|
||||||
|
path: '/',
|
||||||
|
capabilities: [
|
||||||
|
{
|
||||||
|
// Set maxInstances to 1 if screen recordings are enabled:
|
||||||
|
// maxInstances: 1,
|
||||||
|
browserName: 'chrome',
|
||||||
|
'goog:chromeOptions': {
|
||||||
|
// Disable headless mode if screen recordings are enabled:
|
||||||
|
args: ['--headless', '--window-size=1440,900']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
logLevel: 'warn',
|
||||||
|
reporters: ['spec'],
|
||||||
|
framework: 'mocha',
|
||||||
|
mochaOpts: {
|
||||||
|
timeout: 60000
|
||||||
|
},
|
||||||
|
specs: ['test/specs/**/*.js'],
|
||||||
|
maximizeWindow: true,
|
||||||
|
screenshots: {
|
||||||
|
saveOnFail: true
|
||||||
|
},
|
||||||
|
videos: {
|
||||||
|
enabled: false,
|
||||||
|
resolution: '1440x900',
|
||||||
|
startDelay: 500,
|
||||||
|
stopDelay: 500
|
||||||
|
},
|
||||||
|
assetsDir: '/home/webdriver/assets/',
|
||||||
|
baseUrl: 'http://example'
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.config = Object.assign({}, require('../hooks'), config)
|
23
vendor/blueimp/jquery-file-upload/wdio/conf/edge.js
vendored
Normal file
23
vendor/blueimp/jquery-file-upload/wdio/conf/edge.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.Config */
|
||||||
|
const config = {
|
||||||
|
hostname: process.env.WINDOWS_HOST || 'host.docker.internal',
|
||||||
|
capabilities: [
|
||||||
|
{
|
||||||
|
// Set maxInstances to 1 if screen recordings are enabled:
|
||||||
|
// maxInstances: 1,
|
||||||
|
browserName: 'MicrosoftEdge'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
videos: {
|
||||||
|
enabled: false,
|
||||||
|
inputFormat: 'mjpeg',
|
||||||
|
startDelay: 500,
|
||||||
|
stopDelay: 500
|
||||||
|
},
|
||||||
|
assetsDir: process.env.WINDOWS_ASSETS_DIR || process.env.MACOS_ASSETS_DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.config = Object.assign({}, require('./chrome').config, config)
|
25
vendor/blueimp/jquery-file-upload/wdio/conf/firefox.js
vendored
Normal file
25
vendor/blueimp/jquery-file-upload/wdio/conf/firefox.js
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.Config */
|
||||||
|
const config = {
|
||||||
|
hostname: 'geckodriver',
|
||||||
|
capabilities: [
|
||||||
|
{
|
||||||
|
// geckodriver supports no parallel sessions:
|
||||||
|
maxInstances: 1,
|
||||||
|
browserName: 'firefox',
|
||||||
|
'moz:firefoxOptions': {
|
||||||
|
//args: ['-headless', '--window-size=1440,900']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
videos: {
|
||||||
|
enabled: true,
|
||||||
|
resolution: '1440x900',
|
||||||
|
startDelay: 500,
|
||||||
|
stopDelay: 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.config = Object.assign({}, require('./chrome').config, config)
|
24
vendor/blueimp/jquery-file-upload/wdio/conf/internet-explorer.js
vendored
Normal file
24
vendor/blueimp/jquery-file-upload/wdio/conf/internet-explorer.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.Config */
|
||||||
|
const config = {
|
||||||
|
hostname: process.env.WINDOWS_HOST || 'host.docker.internal',
|
||||||
|
port: 4445,
|
||||||
|
capabilities: [
|
||||||
|
{
|
||||||
|
// IEDriverServer supports no parallel sessions:
|
||||||
|
maxInstances: 1,
|
||||||
|
browserName: 'internet explorer'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
videos: {
|
||||||
|
enabled: true,
|
||||||
|
inputFormat: 'mjpeg',
|
||||||
|
startDelay: 500,
|
||||||
|
stopDelay: 500
|
||||||
|
},
|
||||||
|
assetsDir: process.env.WINDOWS_ASSETS_DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.config = Object.assign({}, require('./chrome').config, config)
|
24
vendor/blueimp/jquery-file-upload/wdio/conf/safari.js
vendored
Normal file
24
vendor/blueimp/jquery-file-upload/wdio/conf/safari.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.Config */
|
||||||
|
const config = {
|
||||||
|
// Docker for Mac host address:
|
||||||
|
hostname: 'host.docker.internal',
|
||||||
|
capabilities: [
|
||||||
|
{
|
||||||
|
// safaridriver supports no parallel sessions:
|
||||||
|
maxInstances: 1,
|
||||||
|
browserName: 'safari'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
videos: {
|
||||||
|
enabled: true,
|
||||||
|
inputFormat: 'mjpeg',
|
||||||
|
startDelay: 500,
|
||||||
|
stopDelay: 500
|
||||||
|
},
|
||||||
|
assetsDir: process.env.MACOS_ASSETS_DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.config = Object.assign({}, require('./chrome').config, config)
|
26
vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
vendored
Normal file
26
vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* global browser, Promise */
|
||||||
|
|
||||||
|
const cmds = require('wdio-screen-commands')
|
||||||
|
|
||||||
|
/* eslint-disable jsdoc/valid-types */
|
||||||
|
/** @type WebdriverIO.HookFunctions */
|
||||||
|
const config = {
|
||||||
|
before: async () => {
|
||||||
|
browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName)
|
||||||
|
browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot)
|
||||||
|
if (browser.config.maximizeWindow) await browser.maximizeWindow()
|
||||||
|
},
|
||||||
|
beforeTest: async test => {
|
||||||
|
await cmds.startScreenRecording(test)
|
||||||
|
},
|
||||||
|
afterTest: async (test, context, result) => {
|
||||||
|
await Promise.all([
|
||||||
|
cmds.stopScreenRecording(test, result),
|
||||||
|
cmds.saveScreenshotByTest(test, result)
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config
|
2
vendor/blueimp/jquery-file-upload/wdio/reports/.gitignore
vendored
Normal file
2
vendor/blueimp/jquery-file-upload/wdio/reports/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!/.gitignore
|
74
vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js
vendored
Normal file
74
vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js
vendored
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* global browser, $, $$ */
|
||||||
|
/* eslint-disable class-methods-use-this */
|
||||||
|
|
||||||
|
class FileUpload {
|
||||||
|
get fileinput() {
|
||||||
|
return $('.fileinput-button input')
|
||||||
|
}
|
||||||
|
get start() {
|
||||||
|
return $('.fileupload-buttonbar .start')
|
||||||
|
}
|
||||||
|
get toggle() {
|
||||||
|
return $('.fileupload-buttonbar .toggle')
|
||||||
|
}
|
||||||
|
get remove() {
|
||||||
|
return $('.fileupload-buttonbar .delete')
|
||||||
|
}
|
||||||
|
get processing() {
|
||||||
|
return $$('.files .processing')
|
||||||
|
}
|
||||||
|
get uploads() {
|
||||||
|
return $$('.files .template-upload')
|
||||||
|
}
|
||||||
|
get downloads() {
|
||||||
|
return $$('.files .template-download')
|
||||||
|
}
|
||||||
|
get checked() {
|
||||||
|
return $$('.files .toggle:checked')
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Opens the file upload form.
|
||||||
|
*
|
||||||
|
* @param {number} [timeout] Wait timeout
|
||||||
|
* @returns {FileUpload} FileUpload object
|
||||||
|
*/
|
||||||
|
open(timeout) {
|
||||||
|
browser.url('/')
|
||||||
|
this.fileinput.waitForExist({ timeout })
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Uploads files.
|
||||||
|
*
|
||||||
|
* @param {Array<string>} files Files to upload
|
||||||
|
* @param {number} [timeout] Wait timeout
|
||||||
|
* @returns {FileUpload} FileUpload object
|
||||||
|
*/
|
||||||
|
upload(files, timeout) {
|
||||||
|
this.fileinput.addValue(files.join('\n'))
|
||||||
|
browser.waitUntil(() => !this.processing.length, { timeout })
|
||||||
|
this.start.click()
|
||||||
|
browser.waitUntil(() => !!this.downloads.length, { timeout })
|
||||||
|
browser.waitUntil(() => !this.uploads.length, { timeout })
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Deletes uploaded files.
|
||||||
|
*
|
||||||
|
* @param {number} [timeout] Wait timeout
|
||||||
|
* @returns {FileUpload} FileUpload object
|
||||||
|
*/
|
||||||
|
delete(timeout) {
|
||||||
|
this.toggle.click()
|
||||||
|
browser.waitUntil(() => this.downloads.length === this.checked.length, {
|
||||||
|
timeout
|
||||||
|
})
|
||||||
|
this.remove.click()
|
||||||
|
browser.waitUntil(() => !this.downloads.length, { timeout })
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = new FileUpload()
|
23
vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js
vendored
Normal file
23
vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* global browser, describe, it */
|
||||||
|
|
||||||
|
const FileUpload = require('../pages/file-upload')
|
||||||
|
const assetsDir = browser.config.assetsDir
|
||||||
|
|
||||||
|
describe('File Upload', () => {
|
||||||
|
if (!assetsDir) return
|
||||||
|
|
||||||
|
it('uploads files', () => {
|
||||||
|
FileUpload.open().upload([
|
||||||
|
assetsDir + 'black+white-60x40.gif',
|
||||||
|
assetsDir + 'black+white-3x2.jpg'
|
||||||
|
])
|
||||||
|
browser.saveAndDiffScreenshot('Files uploaded')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('deletes files', () => {
|
||||||
|
FileUpload.open().delete()
|
||||||
|
browser.saveAndDiffScreenshot('Files deleted')
|
||||||
|
})
|
||||||
|
})
|
4
vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js
vendored
Normal file
4
vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
// Default to the Chrome config:
|
||||||
|
exports.config = require('./conf/chrome').config
|
16
vendor/composer/autoload_classmap.php
vendored
16
vendor/composer/autoload_classmap.php
vendored
|
@ -619,9 +619,6 @@ return array(
|
||||||
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
|
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||||
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
|
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||||
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
|
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
|
||||||
'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
|
|
||||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
|
||||||
'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
|
|
||||||
'Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php',
|
'Ramsey\\Uuid\\BinaryUtils' => $vendorDir . '/ramsey/uuid/src/BinaryUtils.php',
|
||||||
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
|
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
|
||||||
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
|
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => $vendorDir . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
|
||||||
|
@ -1261,6 +1258,7 @@ return array(
|
||||||
'Zotlabs\\Daemon\\Cache_embeds' => $baseDir . '/Zotlabs/Daemon/Cache_embeds.php',
|
'Zotlabs\\Daemon\\Cache_embeds' => $baseDir . '/Zotlabs/Daemon/Cache_embeds.php',
|
||||||
'Zotlabs\\Daemon\\Checksites' => $baseDir . '/Zotlabs/Daemon/Checksites.php',
|
'Zotlabs\\Daemon\\Checksites' => $baseDir . '/Zotlabs/Daemon/Checksites.php',
|
||||||
'Zotlabs\\Daemon\\Cli_suggest' => $baseDir . '/Zotlabs/Daemon/Cli_suggest.php',
|
'Zotlabs\\Daemon\\Cli_suggest' => $baseDir . '/Zotlabs/Daemon/Cli_suggest.php',
|
||||||
|
'Zotlabs\\Daemon\\Convo' => $baseDir . '/Zotlabs/Daemon/Convo.php',
|
||||||
'Zotlabs\\Daemon\\Cron' => $baseDir . '/Zotlabs/Daemon/Cron.php',
|
'Zotlabs\\Daemon\\Cron' => $baseDir . '/Zotlabs/Daemon/Cron.php',
|
||||||
'Zotlabs\\Daemon\\Cron_daily' => $baseDir . '/Zotlabs/Daemon/Cron_daily.php',
|
'Zotlabs\\Daemon\\Cron_daily' => $baseDir . '/Zotlabs/Daemon/Cron_daily.php',
|
||||||
'Zotlabs\\Daemon\\Cron_weekly' => $baseDir . '/Zotlabs/Daemon/Cron_weekly.php',
|
'Zotlabs\\Daemon\\Cron_weekly' => $baseDir . '/Zotlabs/Daemon/Cron_weekly.php',
|
||||||
|
@ -1346,9 +1344,11 @@ return array(
|
||||||
'Zotlabs\\Module\\Admin\\Accounts' => $baseDir . '/Zotlabs/Module/Admin/Accounts.php',
|
'Zotlabs\\Module\\Admin\\Accounts' => $baseDir . '/Zotlabs/Module/Admin/Accounts.php',
|
||||||
'Zotlabs\\Module\\Admin\\Addons' => $baseDir . '/Zotlabs/Module/Admin/Addons.php',
|
'Zotlabs\\Module\\Admin\\Addons' => $baseDir . '/Zotlabs/Module/Admin/Addons.php',
|
||||||
'Zotlabs\\Module\\Admin\\Channels' => $baseDir . '/Zotlabs/Module/Admin/Channels.php',
|
'Zotlabs\\Module\\Admin\\Channels' => $baseDir . '/Zotlabs/Module/Admin/Channels.php',
|
||||||
|
'Zotlabs\\Module\\Admin\\Cover_photo' => $baseDir . '/Zotlabs/Module/Admin/Cover_photo.php',
|
||||||
'Zotlabs\\Module\\Admin\\Dbsync' => $baseDir . '/Zotlabs/Module/Admin/Dbsync.php',
|
'Zotlabs\\Module\\Admin\\Dbsync' => $baseDir . '/Zotlabs/Module/Admin/Dbsync.php',
|
||||||
'Zotlabs\\Module\\Admin\\Features' => $baseDir . '/Zotlabs/Module/Admin/Features.php',
|
'Zotlabs\\Module\\Admin\\Features' => $baseDir . '/Zotlabs/Module/Admin/Features.php',
|
||||||
'Zotlabs\\Module\\Admin\\Logs' => $baseDir . '/Zotlabs/Module/Admin/Logs.php',
|
'Zotlabs\\Module\\Admin\\Logs' => $baseDir . '/Zotlabs/Module/Admin/Logs.php',
|
||||||
|
'Zotlabs\\Module\\Admin\\Profile_photo' => $baseDir . '/Zotlabs/Module/Admin/Profile_photo.php',
|
||||||
'Zotlabs\\Module\\Admin\\Profs' => $baseDir . '/Zotlabs/Module/Admin/Profs.php',
|
'Zotlabs\\Module\\Admin\\Profs' => $baseDir . '/Zotlabs/Module/Admin/Profs.php',
|
||||||
'Zotlabs\\Module\\Admin\\Queue' => $baseDir . '/Zotlabs/Module/Admin/Queue.php',
|
'Zotlabs\\Module\\Admin\\Queue' => $baseDir . '/Zotlabs/Module/Admin/Queue.php',
|
||||||
'Zotlabs\\Module\\Admin\\Security' => $baseDir . '/Zotlabs/Module/Admin/Security.php',
|
'Zotlabs\\Module\\Admin\\Security' => $baseDir . '/Zotlabs/Module/Admin/Security.php',
|
||||||
|
@ -1444,6 +1444,7 @@ return array(
|
||||||
'Zotlabs\\Module\\Lostpass' => $baseDir . '/Zotlabs/Module/Lostpass.php',
|
'Zotlabs\\Module\\Lostpass' => $baseDir . '/Zotlabs/Module/Lostpass.php',
|
||||||
'Zotlabs\\Module\\Magic' => $baseDir . '/Zotlabs/Module/Magic.php',
|
'Zotlabs\\Module\\Magic' => $baseDir . '/Zotlabs/Module/Magic.php',
|
||||||
'Zotlabs\\Module\\Manage' => $baseDir . '/Zotlabs/Module/Manage.php',
|
'Zotlabs\\Module\\Manage' => $baseDir . '/Zotlabs/Module/Manage.php',
|
||||||
|
'Zotlabs\\Module\\Markup' => $baseDir . '/Zotlabs/Module/Markup.php',
|
||||||
'Zotlabs\\Module\\Menu' => $baseDir . '/Zotlabs/Module/Menu.php',
|
'Zotlabs\\Module\\Menu' => $baseDir . '/Zotlabs/Module/Menu.php',
|
||||||
'Zotlabs\\Module\\Mitem' => $baseDir . '/Zotlabs/Module/Mitem.php',
|
'Zotlabs\\Module\\Mitem' => $baseDir . '/Zotlabs/Module/Mitem.php',
|
||||||
'Zotlabs\\Module\\Moderate' => $baseDir . '/Zotlabs/Module/Moderate.php',
|
'Zotlabs\\Module\\Moderate' => $baseDir . '/Zotlabs/Module/Moderate.php',
|
||||||
|
@ -1478,7 +1479,6 @@ return array(
|
||||||
'Zotlabs\\Module\\Profile_photo' => $baseDir . '/Zotlabs/Module/Profile_photo.php',
|
'Zotlabs\\Module\\Profile_photo' => $baseDir . '/Zotlabs/Module/Profile_photo.php',
|
||||||
'Zotlabs\\Module\\Profiles' => $baseDir . '/Zotlabs/Module/Profiles.php',
|
'Zotlabs\\Module\\Profiles' => $baseDir . '/Zotlabs/Module/Profiles.php',
|
||||||
'Zotlabs\\Module\\Profperm' => $baseDir . '/Zotlabs/Module/Profperm.php',
|
'Zotlabs\\Module\\Profperm' => $baseDir . '/Zotlabs/Module/Profperm.php',
|
||||||
'Zotlabs\\Module\\Pubsites' => $baseDir . '/Zotlabs/Module/Pubsites.php',
|
|
||||||
'Zotlabs\\Module\\Pubstream' => $baseDir . '/Zotlabs/Module/Pubstream.php',
|
'Zotlabs\\Module\\Pubstream' => $baseDir . '/Zotlabs/Module/Pubstream.php',
|
||||||
'Zotlabs\\Module\\Q' => $baseDir . '/Zotlabs/Module/Q.php',
|
'Zotlabs\\Module\\Q' => $baseDir . '/Zotlabs/Module/Q.php',
|
||||||
'Zotlabs\\Module\\Randprof' => $baseDir . '/Zotlabs/Module/Randprof.php',
|
'Zotlabs\\Module\\Randprof' => $baseDir . '/Zotlabs/Module/Randprof.php',
|
||||||
|
@ -1512,6 +1512,7 @@ return array(
|
||||||
'Zotlabs\\Module\\Sharedwithme' => $baseDir . '/Zotlabs/Module/Sharedwithme.php',
|
'Zotlabs\\Module\\Sharedwithme' => $baseDir . '/Zotlabs/Module/Sharedwithme.php',
|
||||||
'Zotlabs\\Module\\Siteinfo' => $baseDir . '/Zotlabs/Module/Siteinfo.php',
|
'Zotlabs\\Module\\Siteinfo' => $baseDir . '/Zotlabs/Module/Siteinfo.php',
|
||||||
'Zotlabs\\Module\\Sitelist' => $baseDir . '/Zotlabs/Module/Sitelist.php',
|
'Zotlabs\\Module\\Sitelist' => $baseDir . '/Zotlabs/Module/Sitelist.php',
|
||||||
|
'Zotlabs\\Module\\Sites' => $baseDir . '/Zotlabs/Module/Sites.php',
|
||||||
'Zotlabs\\Module\\Smilies' => $baseDir . '/Zotlabs/Module/Smilies.php',
|
'Zotlabs\\Module\\Smilies' => $baseDir . '/Zotlabs/Module/Smilies.php',
|
||||||
'Zotlabs\\Module\\Sources' => $baseDir . '/Zotlabs/Module/Sources.php',
|
'Zotlabs\\Module\\Sources' => $baseDir . '/Zotlabs/Module/Sources.php',
|
||||||
'Zotlabs\\Module\\Sslify' => $baseDir . '/Zotlabs/Module/Sslify.php',
|
'Zotlabs\\Module\\Sslify' => $baseDir . '/Zotlabs/Module/Sslify.php',
|
||||||
|
@ -1533,6 +1534,7 @@ return array(
|
||||||
'Zotlabs\\Module\\View' => $baseDir . '/Zotlabs/Module/View.php',
|
'Zotlabs\\Module\\View' => $baseDir . '/Zotlabs/Module/View.php',
|
||||||
'Zotlabs\\Module\\Viewconnections' => $baseDir . '/Zotlabs/Module/Viewconnections.php',
|
'Zotlabs\\Module\\Viewconnections' => $baseDir . '/Zotlabs/Module/Viewconnections.php',
|
||||||
'Zotlabs\\Module\\Viewsrc' => $baseDir . '/Zotlabs/Module/Viewsrc.php',
|
'Zotlabs\\Module\\Viewsrc' => $baseDir . '/Zotlabs/Module/Viewsrc.php',
|
||||||
|
'Zotlabs\\Module\\Vlists' => $baseDir . '/Zotlabs/Module/Vlists.php',
|
||||||
'Zotlabs\\Module\\Vote' => $baseDir . '/Zotlabs/Module/Vote.php',
|
'Zotlabs\\Module\\Vote' => $baseDir . '/Zotlabs/Module/Vote.php',
|
||||||
'Zotlabs\\Module\\Wall_attach' => $baseDir . '/Zotlabs/Module/Wall_attach.php',
|
'Zotlabs\\Module\\Wall_attach' => $baseDir . '/Zotlabs/Module/Wall_attach.php',
|
||||||
'Zotlabs\\Module\\Wall_upload' => $baseDir . '/Zotlabs/Module/Wall_upload.php',
|
'Zotlabs\\Module\\Wall_upload' => $baseDir . '/Zotlabs/Module/Wall_upload.php',
|
||||||
|
@ -1540,6 +1542,7 @@ return array(
|
||||||
'Zotlabs\\Module\\Webpages' => $baseDir . '/Zotlabs/Module/Webpages.php',
|
'Zotlabs\\Module\\Webpages' => $baseDir . '/Zotlabs/Module/Webpages.php',
|
||||||
'Zotlabs\\Module\\Well_known' => $baseDir . '/Zotlabs/Module/Well_known.php',
|
'Zotlabs\\Module\\Well_known' => $baseDir . '/Zotlabs/Module/Well_known.php',
|
||||||
'Zotlabs\\Module\\Xchan' => $baseDir . '/Zotlabs/Module/Xchan.php',
|
'Zotlabs\\Module\\Xchan' => $baseDir . '/Zotlabs/Module/Xchan.php',
|
||||||
|
'Zotlabs\\Module\\Xp' => $baseDir . '/Zotlabs/Module/Xp.php',
|
||||||
'Zotlabs\\Module\\Xref' => $baseDir . '/Zotlabs/Module/Xref.php',
|
'Zotlabs\\Module\\Xref' => $baseDir . '/Zotlabs/Module/Xref.php',
|
||||||
'Zotlabs\\Module\\Zot' => $baseDir . '/Zotlabs/Module/Zot.php',
|
'Zotlabs\\Module\\Zot' => $baseDir . '/Zotlabs/Module/Zot.php',
|
||||||
'Zotlabs\\Module\\Zot_probe' => $baseDir . '/Zotlabs/Module/Zot_probe.php',
|
'Zotlabs\\Module\\Zot_probe' => $baseDir . '/Zotlabs/Module/Zot_probe.php',
|
||||||
|
@ -1809,6 +1812,8 @@ return array(
|
||||||
'Zotlabs\\Update\\_1239' => $baseDir . '/Zotlabs/Update/_1239.php',
|
'Zotlabs\\Update\\_1239' => $baseDir . '/Zotlabs/Update/_1239.php',
|
||||||
'Zotlabs\\Update\\_1240' => $baseDir . '/Zotlabs/Update/_1240.php',
|
'Zotlabs\\Update\\_1240' => $baseDir . '/Zotlabs/Update/_1240.php',
|
||||||
'Zotlabs\\Update\\_1241' => $baseDir . '/Zotlabs/Update/_1241.php',
|
'Zotlabs\\Update\\_1241' => $baseDir . '/Zotlabs/Update/_1241.php',
|
||||||
|
'Zotlabs\\Update\\_1242' => $baseDir . '/Zotlabs/Update/_1242.php',
|
||||||
|
'Zotlabs\\Update\\_1243' => $baseDir . '/Zotlabs/Update/_1243.php',
|
||||||
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
|
'Zotlabs\\Web\\Controller' => $baseDir . '/Zotlabs/Web/Controller.php',
|
||||||
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
|
'Zotlabs\\Web\\HTTPHeaders' => $baseDir . '/Zotlabs/Web/HTTPHeaders.php',
|
||||||
'Zotlabs\\Web\\HTTPSig' => $baseDir . '/Zotlabs/Web/HTTPSig.php',
|
'Zotlabs\\Web\\HTTPSig' => $baseDir . '/Zotlabs/Web/HTTPSig.php',
|
||||||
|
@ -1861,13 +1866,14 @@ return array(
|
||||||
'Zotlabs\\Widget\\Pinned' => $baseDir . '/Zotlabs/Widget/Pinned.php',
|
'Zotlabs\\Widget\\Pinned' => $baseDir . '/Zotlabs/Widget/Pinned.php',
|
||||||
'Zotlabs\\Widget\\Portfolio' => $baseDir . '/Zotlabs/Widget/Portfolio.php',
|
'Zotlabs\\Widget\\Portfolio' => $baseDir . '/Zotlabs/Widget/Portfolio.php',
|
||||||
'Zotlabs\\Widget\\Profile' => $baseDir . '/Zotlabs/Widget/Profile.php',
|
'Zotlabs\\Widget\\Profile' => $baseDir . '/Zotlabs/Widget/Profile.php',
|
||||||
'Zotlabs\\Widget\\Pubsites' => $baseDir . '/Zotlabs/Widget/Pubsites.php',
|
|
||||||
'Zotlabs\\Widget\\Pubtagcloud' => $baseDir . '/Zotlabs/Widget/Pubtagcloud.php',
|
'Zotlabs\\Widget\\Pubtagcloud' => $baseDir . '/Zotlabs/Widget/Pubtagcloud.php',
|
||||||
'Zotlabs\\Widget\\Random_block' => $baseDir . '/Zotlabs/Widget/Random_block.php',
|
'Zotlabs\\Widget\\Random_block' => $baseDir . '/Zotlabs/Widget/Random_block.php',
|
||||||
'Zotlabs\\Widget\\Rating' => $baseDir . '/Zotlabs/Widget/Rating.php',
|
'Zotlabs\\Widget\\Rating' => $baseDir . '/Zotlabs/Widget/Rating.php',
|
||||||
'Zotlabs\\Widget\\Savedsearch' => $baseDir . '/Zotlabs/Widget/Savedsearch.php',
|
'Zotlabs\\Widget\\Savedsearch' => $baseDir . '/Zotlabs/Widget/Savedsearch.php',
|
||||||
|
'Zotlabs\\Widget\\Sblock' => $baseDir . '/Zotlabs/Widget/Sblock.php',
|
||||||
'Zotlabs\\Widget\\Settings_menu' => $baseDir . '/Zotlabs/Widget/Settings_menu.php',
|
'Zotlabs\\Widget\\Settings_menu' => $baseDir . '/Zotlabs/Widget/Settings_menu.php',
|
||||||
'Zotlabs\\Widget\\Shortprofile' => $baseDir . '/Zotlabs/Widget/Shortprofile.php',
|
'Zotlabs\\Widget\\Shortprofile' => $baseDir . '/Zotlabs/Widget/Shortprofile.php',
|
||||||
|
'Zotlabs\\Widget\\Site_projects' => $baseDir . '/Zotlabs/Widget/Site_projects.php',
|
||||||
'Zotlabs\\Widget\\Sitesearch' => $baseDir . '/Zotlabs/Widget/Sitesearch.php',
|
'Zotlabs\\Widget\\Sitesearch' => $baseDir . '/Zotlabs/Widget/Sitesearch.php',
|
||||||
'Zotlabs\\Widget\\Stream_order' => $baseDir . '/Zotlabs/Widget/Stream_order.php',
|
'Zotlabs\\Widget\\Stream_order' => $baseDir . '/Zotlabs/Widget/Stream_order.php',
|
||||||
'Zotlabs\\Widget\\Suggestedchats' => $baseDir . '/Zotlabs/Widget/Suggestedchats.php',
|
'Zotlabs\\Widget\\Suggestedchats' => $baseDir . '/Zotlabs/Widget/Suggestedchats.php',
|
||||||
|
|
16
vendor/composer/autoload_static.php
vendored
16
vendor/composer/autoload_static.php
vendored
|
@ -895,9 +895,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
|
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
|
||||||
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
|
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
|
||||||
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
|
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
|
||||||
'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
|
|
||||||
'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
|
|
||||||
'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
|
|
||||||
'Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php',
|
'Ramsey\\Uuid\\BinaryUtils' => __DIR__ . '/..' . '/ramsey/uuid/src/BinaryUtils.php',
|
||||||
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
|
'Ramsey\\Uuid\\Builder\\DefaultUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DefaultUuidBuilder.php',
|
||||||
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
|
'Ramsey\\Uuid\\Builder\\DegradedUuidBuilder' => __DIR__ . '/..' . '/ramsey/uuid/src/Builder/DegradedUuidBuilder.php',
|
||||||
|
@ -1537,6 +1534,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Daemon\\Cache_embeds' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cache_embeds.php',
|
'Zotlabs\\Daemon\\Cache_embeds' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cache_embeds.php',
|
||||||
'Zotlabs\\Daemon\\Checksites' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Checksites.php',
|
'Zotlabs\\Daemon\\Checksites' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Checksites.php',
|
||||||
'Zotlabs\\Daemon\\Cli_suggest' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cli_suggest.php',
|
'Zotlabs\\Daemon\\Cli_suggest' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cli_suggest.php',
|
||||||
|
'Zotlabs\\Daemon\\Convo' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Convo.php',
|
||||||
'Zotlabs\\Daemon\\Cron' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron.php',
|
'Zotlabs\\Daemon\\Cron' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron.php',
|
||||||
'Zotlabs\\Daemon\\Cron_daily' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron_daily.php',
|
'Zotlabs\\Daemon\\Cron_daily' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron_daily.php',
|
||||||
'Zotlabs\\Daemon\\Cron_weekly' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron_weekly.php',
|
'Zotlabs\\Daemon\\Cron_weekly' => __DIR__ . '/../..' . '/Zotlabs/Daemon/Cron_weekly.php',
|
||||||
|
@ -1622,9 +1620,11 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\Admin\\Accounts' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Accounts.php',
|
'Zotlabs\\Module\\Admin\\Accounts' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Accounts.php',
|
||||||
'Zotlabs\\Module\\Admin\\Addons' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Addons.php',
|
'Zotlabs\\Module\\Admin\\Addons' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Addons.php',
|
||||||
'Zotlabs\\Module\\Admin\\Channels' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Channels.php',
|
'Zotlabs\\Module\\Admin\\Channels' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Channels.php',
|
||||||
|
'Zotlabs\\Module\\Admin\\Cover_photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Cover_photo.php',
|
||||||
'Zotlabs\\Module\\Admin\\Dbsync' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Dbsync.php',
|
'Zotlabs\\Module\\Admin\\Dbsync' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Dbsync.php',
|
||||||
'Zotlabs\\Module\\Admin\\Features' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Features.php',
|
'Zotlabs\\Module\\Admin\\Features' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Features.php',
|
||||||
'Zotlabs\\Module\\Admin\\Logs' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Logs.php',
|
'Zotlabs\\Module\\Admin\\Logs' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Logs.php',
|
||||||
|
'Zotlabs\\Module\\Admin\\Profile_photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Profile_photo.php',
|
||||||
'Zotlabs\\Module\\Admin\\Profs' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Profs.php',
|
'Zotlabs\\Module\\Admin\\Profs' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Profs.php',
|
||||||
'Zotlabs\\Module\\Admin\\Queue' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Queue.php',
|
'Zotlabs\\Module\\Admin\\Queue' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Queue.php',
|
||||||
'Zotlabs\\Module\\Admin\\Security' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Security.php',
|
'Zotlabs\\Module\\Admin\\Security' => __DIR__ . '/../..' . '/Zotlabs/Module/Admin/Security.php',
|
||||||
|
@ -1720,6 +1720,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\Lostpass' => __DIR__ . '/../..' . '/Zotlabs/Module/Lostpass.php',
|
'Zotlabs\\Module\\Lostpass' => __DIR__ . '/../..' . '/Zotlabs/Module/Lostpass.php',
|
||||||
'Zotlabs\\Module\\Magic' => __DIR__ . '/../..' . '/Zotlabs/Module/Magic.php',
|
'Zotlabs\\Module\\Magic' => __DIR__ . '/../..' . '/Zotlabs/Module/Magic.php',
|
||||||
'Zotlabs\\Module\\Manage' => __DIR__ . '/../..' . '/Zotlabs/Module/Manage.php',
|
'Zotlabs\\Module\\Manage' => __DIR__ . '/../..' . '/Zotlabs/Module/Manage.php',
|
||||||
|
'Zotlabs\\Module\\Markup' => __DIR__ . '/../..' . '/Zotlabs/Module/Markup.php',
|
||||||
'Zotlabs\\Module\\Menu' => __DIR__ . '/../..' . '/Zotlabs/Module/Menu.php',
|
'Zotlabs\\Module\\Menu' => __DIR__ . '/../..' . '/Zotlabs/Module/Menu.php',
|
||||||
'Zotlabs\\Module\\Mitem' => __DIR__ . '/../..' . '/Zotlabs/Module/Mitem.php',
|
'Zotlabs\\Module\\Mitem' => __DIR__ . '/../..' . '/Zotlabs/Module/Mitem.php',
|
||||||
'Zotlabs\\Module\\Moderate' => __DIR__ . '/../..' . '/Zotlabs/Module/Moderate.php',
|
'Zotlabs\\Module\\Moderate' => __DIR__ . '/../..' . '/Zotlabs/Module/Moderate.php',
|
||||||
|
@ -1754,7 +1755,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\Profile_photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Profile_photo.php',
|
'Zotlabs\\Module\\Profile_photo' => __DIR__ . '/../..' . '/Zotlabs/Module/Profile_photo.php',
|
||||||
'Zotlabs\\Module\\Profiles' => __DIR__ . '/../..' . '/Zotlabs/Module/Profiles.php',
|
'Zotlabs\\Module\\Profiles' => __DIR__ . '/../..' . '/Zotlabs/Module/Profiles.php',
|
||||||
'Zotlabs\\Module\\Profperm' => __DIR__ . '/../..' . '/Zotlabs/Module/Profperm.php',
|
'Zotlabs\\Module\\Profperm' => __DIR__ . '/../..' . '/Zotlabs/Module/Profperm.php',
|
||||||
'Zotlabs\\Module\\Pubsites' => __DIR__ . '/../..' . '/Zotlabs/Module/Pubsites.php',
|
|
||||||
'Zotlabs\\Module\\Pubstream' => __DIR__ . '/../..' . '/Zotlabs/Module/Pubstream.php',
|
'Zotlabs\\Module\\Pubstream' => __DIR__ . '/../..' . '/Zotlabs/Module/Pubstream.php',
|
||||||
'Zotlabs\\Module\\Q' => __DIR__ . '/../..' . '/Zotlabs/Module/Q.php',
|
'Zotlabs\\Module\\Q' => __DIR__ . '/../..' . '/Zotlabs/Module/Q.php',
|
||||||
'Zotlabs\\Module\\Randprof' => __DIR__ . '/../..' . '/Zotlabs/Module/Randprof.php',
|
'Zotlabs\\Module\\Randprof' => __DIR__ . '/../..' . '/Zotlabs/Module/Randprof.php',
|
||||||
|
@ -1788,6 +1788,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\Sharedwithme' => __DIR__ . '/../..' . '/Zotlabs/Module/Sharedwithme.php',
|
'Zotlabs\\Module\\Sharedwithme' => __DIR__ . '/../..' . '/Zotlabs/Module/Sharedwithme.php',
|
||||||
'Zotlabs\\Module\\Siteinfo' => __DIR__ . '/../..' . '/Zotlabs/Module/Siteinfo.php',
|
'Zotlabs\\Module\\Siteinfo' => __DIR__ . '/../..' . '/Zotlabs/Module/Siteinfo.php',
|
||||||
'Zotlabs\\Module\\Sitelist' => __DIR__ . '/../..' . '/Zotlabs/Module/Sitelist.php',
|
'Zotlabs\\Module\\Sitelist' => __DIR__ . '/../..' . '/Zotlabs/Module/Sitelist.php',
|
||||||
|
'Zotlabs\\Module\\Sites' => __DIR__ . '/../..' . '/Zotlabs/Module/Sites.php',
|
||||||
'Zotlabs\\Module\\Smilies' => __DIR__ . '/../..' . '/Zotlabs/Module/Smilies.php',
|
'Zotlabs\\Module\\Smilies' => __DIR__ . '/../..' . '/Zotlabs/Module/Smilies.php',
|
||||||
'Zotlabs\\Module\\Sources' => __DIR__ . '/../..' . '/Zotlabs/Module/Sources.php',
|
'Zotlabs\\Module\\Sources' => __DIR__ . '/../..' . '/Zotlabs/Module/Sources.php',
|
||||||
'Zotlabs\\Module\\Sslify' => __DIR__ . '/../..' . '/Zotlabs/Module/Sslify.php',
|
'Zotlabs\\Module\\Sslify' => __DIR__ . '/../..' . '/Zotlabs/Module/Sslify.php',
|
||||||
|
@ -1809,6 +1810,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\View' => __DIR__ . '/../..' . '/Zotlabs/Module/View.php',
|
'Zotlabs\\Module\\View' => __DIR__ . '/../..' . '/Zotlabs/Module/View.php',
|
||||||
'Zotlabs\\Module\\Viewconnections' => __DIR__ . '/../..' . '/Zotlabs/Module/Viewconnections.php',
|
'Zotlabs\\Module\\Viewconnections' => __DIR__ . '/../..' . '/Zotlabs/Module/Viewconnections.php',
|
||||||
'Zotlabs\\Module\\Viewsrc' => __DIR__ . '/../..' . '/Zotlabs/Module/Viewsrc.php',
|
'Zotlabs\\Module\\Viewsrc' => __DIR__ . '/../..' . '/Zotlabs/Module/Viewsrc.php',
|
||||||
|
'Zotlabs\\Module\\Vlists' => __DIR__ . '/../..' . '/Zotlabs/Module/Vlists.php',
|
||||||
'Zotlabs\\Module\\Vote' => __DIR__ . '/../..' . '/Zotlabs/Module/Vote.php',
|
'Zotlabs\\Module\\Vote' => __DIR__ . '/../..' . '/Zotlabs/Module/Vote.php',
|
||||||
'Zotlabs\\Module\\Wall_attach' => __DIR__ . '/../..' . '/Zotlabs/Module/Wall_attach.php',
|
'Zotlabs\\Module\\Wall_attach' => __DIR__ . '/../..' . '/Zotlabs/Module/Wall_attach.php',
|
||||||
'Zotlabs\\Module\\Wall_upload' => __DIR__ . '/../..' . '/Zotlabs/Module/Wall_upload.php',
|
'Zotlabs\\Module\\Wall_upload' => __DIR__ . '/../..' . '/Zotlabs/Module/Wall_upload.php',
|
||||||
|
@ -1816,6 +1818,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Module\\Webpages' => __DIR__ . '/../..' . '/Zotlabs/Module/Webpages.php',
|
'Zotlabs\\Module\\Webpages' => __DIR__ . '/../..' . '/Zotlabs/Module/Webpages.php',
|
||||||
'Zotlabs\\Module\\Well_known' => __DIR__ . '/../..' . '/Zotlabs/Module/Well_known.php',
|
'Zotlabs\\Module\\Well_known' => __DIR__ . '/../..' . '/Zotlabs/Module/Well_known.php',
|
||||||
'Zotlabs\\Module\\Xchan' => __DIR__ . '/../..' . '/Zotlabs/Module/Xchan.php',
|
'Zotlabs\\Module\\Xchan' => __DIR__ . '/../..' . '/Zotlabs/Module/Xchan.php',
|
||||||
|
'Zotlabs\\Module\\Xp' => __DIR__ . '/../..' . '/Zotlabs/Module/Xp.php',
|
||||||
'Zotlabs\\Module\\Xref' => __DIR__ . '/../..' . '/Zotlabs/Module/Xref.php',
|
'Zotlabs\\Module\\Xref' => __DIR__ . '/../..' . '/Zotlabs/Module/Xref.php',
|
||||||
'Zotlabs\\Module\\Zot' => __DIR__ . '/../..' . '/Zotlabs/Module/Zot.php',
|
'Zotlabs\\Module\\Zot' => __DIR__ . '/../..' . '/Zotlabs/Module/Zot.php',
|
||||||
'Zotlabs\\Module\\Zot_probe' => __DIR__ . '/../..' . '/Zotlabs/Module/Zot_probe.php',
|
'Zotlabs\\Module\\Zot_probe' => __DIR__ . '/../..' . '/Zotlabs/Module/Zot_probe.php',
|
||||||
|
@ -2085,6 +2088,8 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Update\\_1239' => __DIR__ . '/../..' . '/Zotlabs/Update/_1239.php',
|
'Zotlabs\\Update\\_1239' => __DIR__ . '/../..' . '/Zotlabs/Update/_1239.php',
|
||||||
'Zotlabs\\Update\\_1240' => __DIR__ . '/../..' . '/Zotlabs/Update/_1240.php',
|
'Zotlabs\\Update\\_1240' => __DIR__ . '/../..' . '/Zotlabs/Update/_1240.php',
|
||||||
'Zotlabs\\Update\\_1241' => __DIR__ . '/../..' . '/Zotlabs/Update/_1241.php',
|
'Zotlabs\\Update\\_1241' => __DIR__ . '/../..' . '/Zotlabs/Update/_1241.php',
|
||||||
|
'Zotlabs\\Update\\_1242' => __DIR__ . '/../..' . '/Zotlabs/Update/_1242.php',
|
||||||
|
'Zotlabs\\Update\\_1243' => __DIR__ . '/../..' . '/Zotlabs/Update/_1243.php',
|
||||||
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
|
'Zotlabs\\Web\\Controller' => __DIR__ . '/../..' . '/Zotlabs/Web/Controller.php',
|
||||||
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
|
'Zotlabs\\Web\\HTTPHeaders' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPHeaders.php',
|
||||||
'Zotlabs\\Web\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPSig.php',
|
'Zotlabs\\Web\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Web/HTTPSig.php',
|
||||||
|
@ -2137,13 +2142,14 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||||
'Zotlabs\\Widget\\Pinned' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pinned.php',
|
'Zotlabs\\Widget\\Pinned' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pinned.php',
|
||||||
'Zotlabs\\Widget\\Portfolio' => __DIR__ . '/../..' . '/Zotlabs/Widget/Portfolio.php',
|
'Zotlabs\\Widget\\Portfolio' => __DIR__ . '/../..' . '/Zotlabs/Widget/Portfolio.php',
|
||||||
'Zotlabs\\Widget\\Profile' => __DIR__ . '/../..' . '/Zotlabs/Widget/Profile.php',
|
'Zotlabs\\Widget\\Profile' => __DIR__ . '/../..' . '/Zotlabs/Widget/Profile.php',
|
||||||
'Zotlabs\\Widget\\Pubsites' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pubsites.php',
|
|
||||||
'Zotlabs\\Widget\\Pubtagcloud' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pubtagcloud.php',
|
'Zotlabs\\Widget\\Pubtagcloud' => __DIR__ . '/../..' . '/Zotlabs/Widget/Pubtagcloud.php',
|
||||||
'Zotlabs\\Widget\\Random_block' => __DIR__ . '/../..' . '/Zotlabs/Widget/Random_block.php',
|
'Zotlabs\\Widget\\Random_block' => __DIR__ . '/../..' . '/Zotlabs/Widget/Random_block.php',
|
||||||
'Zotlabs\\Widget\\Rating' => __DIR__ . '/../..' . '/Zotlabs/Widget/Rating.php',
|
'Zotlabs\\Widget\\Rating' => __DIR__ . '/../..' . '/Zotlabs/Widget/Rating.php',
|
||||||
'Zotlabs\\Widget\\Savedsearch' => __DIR__ . '/../..' . '/Zotlabs/Widget/Savedsearch.php',
|
'Zotlabs\\Widget\\Savedsearch' => __DIR__ . '/../..' . '/Zotlabs/Widget/Savedsearch.php',
|
||||||
|
'Zotlabs\\Widget\\Sblock' => __DIR__ . '/../..' . '/Zotlabs/Widget/Sblock.php',
|
||||||
'Zotlabs\\Widget\\Settings_menu' => __DIR__ . '/../..' . '/Zotlabs/Widget/Settings_menu.php',
|
'Zotlabs\\Widget\\Settings_menu' => __DIR__ . '/../..' . '/Zotlabs/Widget/Settings_menu.php',
|
||||||
'Zotlabs\\Widget\\Shortprofile' => __DIR__ . '/../..' . '/Zotlabs/Widget/Shortprofile.php',
|
'Zotlabs\\Widget\\Shortprofile' => __DIR__ . '/../..' . '/Zotlabs/Widget/Shortprofile.php',
|
||||||
|
'Zotlabs\\Widget\\Site_projects' => __DIR__ . '/../..' . '/Zotlabs/Widget/Site_projects.php',
|
||||||
'Zotlabs\\Widget\\Sitesearch' => __DIR__ . '/../..' . '/Zotlabs/Widget/Sitesearch.php',
|
'Zotlabs\\Widget\\Sitesearch' => __DIR__ . '/../..' . '/Zotlabs/Widget/Sitesearch.php',
|
||||||
'Zotlabs\\Widget\\Stream_order' => __DIR__ . '/../..' . '/Zotlabs/Widget/Stream_order.php',
|
'Zotlabs\\Widget\\Stream_order' => __DIR__ . '/../..' . '/Zotlabs/Widget/Stream_order.php',
|
||||||
'Zotlabs\\Widget\\Suggestedchats' => __DIR__ . '/../..' . '/Zotlabs/Widget/Suggestedchats.php',
|
'Zotlabs\\Widget\\Suggestedchats' => __DIR__ . '/../..' . '/Zotlabs/Widget/Suggestedchats.php',
|
||||||
|
|
52
vendor/composer/installed.json
vendored
52
vendor/composer/installed.json
vendored
|
@ -1,20 +1,20 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "blueimp/jquery-file-upload",
|
"name": "blueimp/jquery-file-upload",
|
||||||
"version": "v9.34.0",
|
"version": "v10.31.0",
|
||||||
"version_normalized": "9.34.0.0",
|
"version_normalized": "10.31.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||||
"reference": "6d86a591f9a35bb811befb750dcd2c7da9ac05a2"
|
"reference": "0740f81829698b84efe17e72501e0f420ea0d611"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/6d86a591f9a35bb811befb750dcd2c7da9ac05a2",
|
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/0740f81829698b84efe17e72501e0f420ea0d611",
|
||||||
"reference": "6d86a591f9a35bb811befb750dcd2c7da9ac05a2",
|
"reference": "0740f81829698b84efe17e72501e0f420ea0d611",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"time": "2019-07-22T13:10:51+00:00",
|
"time": "2020-07-13T05:42:06+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -54,6 +54,12 @@
|
||||||
"selection",
|
"selection",
|
||||||
"upload",
|
"upload",
|
||||||
"widget"
|
"widget"
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/blueimp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -885,17 +891,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/mime-type-detection",
|
"name": "league/mime-type-detection",
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"version_normalized": "1.4.0.0",
|
"version_normalized": "1.5.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28",
|
||||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69",
|
"reference": "ea2fbfc988bade315acd5967e6d02274086d0f28",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -906,7 +912,7 @@
|
||||||
"phpstan/phpstan": "^0.12.36",
|
"phpstan/phpstan": "^0.12.36",
|
||||||
"phpunit/phpunit": "^8.5.8"
|
"phpunit/phpunit": "^8.5.8"
|
||||||
},
|
},
|
||||||
"time": "2020-08-09T10:34:01+00:00",
|
"time": "2020-09-21T18:10:53+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -2377,27 +2383,27 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v2.1.3",
|
"version": "v2.2.0",
|
||||||
"version_normalized": "2.1.3.0",
|
"version_normalized": "2.2.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
|
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665",
|
||||||
"reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
|
"reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.1"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"time": "2020-06-06T08:49:21+00:00",
|
"time": "2020-09-07T11:33:47+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -2443,8 +2449,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"version_normalized": "5.1.3.0",
|
"version_normalized": "5.1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
"url": "https://github.com/symfony/options-resolver.git",
|
||||||
|
@ -2999,8 +3005,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v5.1.3",
|
"version": "v5.1.5",
|
||||||
"version_normalized": "5.1.3.0",
|
"version_normalized": "5.1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
|
|
|
@ -181,6 +181,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
||||||
'dart' => 'application/vnd.dart',
|
'dart' => 'application/vnd.dart',
|
||||||
'dataless' => 'application/vnd.fdsn.seed',
|
'dataless' => 'application/vnd.fdsn.seed',
|
||||||
'davmount' => 'application/davmount+xml',
|
'davmount' => 'application/davmount+xml',
|
||||||
|
'dbf' => 'application/vnd.dbf',
|
||||||
'dbk' => 'application/docbook+xml',
|
'dbk' => 'application/docbook+xml',
|
||||||
'dcr' => 'application/x-director',
|
'dcr' => 'application/x-director',
|
||||||
'dcurl' => 'text/vnd.curl.dcurl',
|
'dcurl' => 'text/vnd.curl.dcurl',
|
||||||
|
@ -468,6 +469,7 @@ class GeneratedExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
||||||
'ksp' => 'application/vnd.kde.kspread',
|
'ksp' => 'application/vnd.kde.kspread',
|
||||||
'ktr' => 'application/vnd.kahootz',
|
'ktr' => 'application/vnd.kahootz',
|
||||||
'ktx' => 'image/ktx',
|
'ktx' => 'image/ktx',
|
||||||
|
'ktx2' => 'image/ktx2',
|
||||||
'ktz' => 'application/vnd.kahootz',
|
'ktz' => 'application/vnd.kahootz',
|
||||||
'kwd' => 'application/vnd.kde.kword',
|
'kwd' => 'application/vnd.kde.kword',
|
||||||
'kwt' => 'application/vnd.kde.kword',
|
'kwt' => 'application/vnd.kde.kword',
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.1-dev"
|
"dev-master": "2.2-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
|
|
@ -22,6 +22,6 @@ if (!function_exists('trigger_deprecation')) {
|
||||||
*/
|
*/
|
||||||
function trigger_deprecation(string $package, string $version, string $message, ...$args): void
|
function trigger_deprecation(string $package, string $version, string $message, ...$args): void
|
||||||
{
|
{
|
||||||
@trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), E_USER_DEPRECATED);
|
@trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue