├── test ├── unit │ └── resources │ │ ├── empty.txt │ │ ├── simpletext.txt │ │ ├── up.jpg │ │ ├── down.jpg │ │ ├── g04.bmp │ │ ├── left.jpg │ │ ├── star.png │ │ ├── right.jpg │ │ ├── sample.tif │ │ ├── fearless.jpeg │ │ ├── up-mirrored.jpg │ │ ├── down-mirrored.jpg │ │ ├── left-mirrored.jpg │ │ ├── right-mirrored.jpg │ │ ├── GPN-2000-001635.jpg │ │ ├── drop-background.gif │ │ └── not-available_l.png ├── dev │ ├── handlers │ │ ├── s3 │ │ │ ├── vendor │ │ │ │ ├── guzzle │ │ │ │ │ └── guzzle │ │ │ │ │ │ ├── docs │ │ │ │ │ │ ├── _templates │ │ │ │ │ │ │ ├── leftbar.html │ │ │ │ │ │ │ └── nav_links.html │ │ │ │ │ │ ├── requirements.txt │ │ │ │ │ │ ├── _static │ │ │ │ │ │ │ ├── logo.png │ │ │ │ │ │ │ ├── guzzle-icon.png │ │ │ │ │ │ │ └── prettify.css │ │ │ │ │ │ ├── index.rst │ │ │ │ │ │ ├── plugins │ │ │ │ │ │ │ ├── plugins-list.rst.inc │ │ │ │ │ │ │ ├── async-plugin.rst │ │ │ │ │ │ │ ├── history-plugin.rst │ │ │ │ │ │ │ ├── mock-plugin.rst │ │ │ │ │ │ │ ├── backoff-plugin.rst │ │ │ │ │ │ │ ├── curl-auth-plugin.rst │ │ │ │ │ │ │ ├── cookie-plugin.rst │ │ │ │ │ │ │ ├── oauth-plugin.rst │ │ │ │ │ │ │ └── md5-validator-plugin.rst │ │ │ │ │ │ ├── getting-started │ │ │ │ │ │ │ └── faq.rst │ │ │ │ │ │ └── docs.rst │ │ │ │ │ │ ├── tests │ │ │ │ │ │ ├── Guzzle │ │ │ │ │ │ │ └── Tests │ │ │ │ │ │ │ │ ├── TestData │ │ │ │ │ │ │ │ ├── FileBody.txt │ │ │ │ │ │ │ │ ├── mock_response │ │ │ │ │ │ │ │ ├── description │ │ │ │ │ │ │ │ │ ├── bar.json │ │ │ │ │ │ │ │ │ ├── recursive.json │ │ │ │ │ │ │ │ │ ├── baz.json │ │ │ │ │ │ │ │ │ └── foo.json │ │ │ │ │ │ │ │ ├── test_service2.json │ │ │ │ │ │ │ │ ├── services │ │ │ │ │ │ │ │ │ ├── json2.json │ │ │ │ │ │ │ │ │ └── json1.json │ │ │ │ │ │ │ │ ├── test_service.json │ │ │ │ │ │ │ │ └── test_service_3.json │ │ │ │ │ │ │ │ ├── Mock │ │ │ │ │ │ │ │ ├── MockSubject.php │ │ │ │ │ │ │ │ ├── ExceptionMock.php │ │ │ │ │ │ │ │ ├── MockMulti.php │ │ │ │ │ │ │ │ ├── CustomResponseModel.php │ │ │ │ │ │ │ │ ├── ErrorResponseMock.php │ │ │ │ │ │ │ │ └── MockObserver.php │ │ │ │ │ │ │ │ ├── Service │ │ │ │ │ │ │ │ ├── Mock │ │ │ │ │ │ │ │ │ ├── Command │ │ │ │ │ │ │ │ │ │ ├── Sub │ │ │ │ │ │ │ │ │ │ │ └── Sub.php │ │ │ │ │ │ │ │ │ │ ├── OtherCommand.php │ │ │ │ │ │ │ │ │ │ ├── IterableCommand.php │ │ │ │ │ │ │ │ │ │ └── MockCommand.php │ │ │ │ │ │ │ │ │ ├── Model │ │ │ │ │ │ │ │ │ │ └── MockCommandIterator.php │ │ │ │ │ │ │ │ │ └── MockClient.php │ │ │ │ │ │ │ │ ├── Exception │ │ │ │ │ │ │ │ │ ├── ValidationExceptionTest.php │ │ │ │ │ │ │ │ │ └── InconsistentClientTransferExceptionTest.php │ │ │ │ │ │ │ │ ├── Command │ │ │ │ │ │ │ │ │ ├── AbstractCommandTest.php │ │ │ │ │ │ │ │ │ ├── LocationVisitor │ │ │ │ │ │ │ │ │ │ ├── Response │ │ │ │ │ │ │ │ │ │ │ ├── BodyVisitorTest.php │ │ │ │ │ │ │ │ │ │ │ ├── StatusCodeVisitorTest.php │ │ │ │ │ │ │ │ │ │ │ ├── ReasonPhraseVisitorTest.php │ │ │ │ │ │ │ │ │ │ │ └── AbstractResponseVisitorTest.php │ │ │ │ │ │ │ │ │ │ └── Request │ │ │ │ │ │ │ │ │ │ │ ├── ResponseBodyVisitorTest.php │ │ │ │ │ │ │ │ │ │ │ ├── PostFieldVisitorTest.php │ │ │ │ │ │ │ │ │ │ │ └── QueryVisitorTest.php │ │ │ │ │ │ │ │ │ ├── Factory │ │ │ │ │ │ │ │ │ │ └── MapFactoryTest.php │ │ │ │ │ │ │ │ │ └── ClosureCommandTest.php │ │ │ │ │ │ │ │ ├── Resource │ │ │ │ │ │ │ │ │ ├── CompositeResourceIteratorFactoryTest.php │ │ │ │ │ │ │ │ │ ├── MapResourceIteratorFactoryTest.php │ │ │ │ │ │ │ │ │ └── ResourceIteratorClassFactoryTest.php │ │ │ │ │ │ │ │ └── CachingConfigLoaderTest.php │ │ │ │ │ │ │ │ ├── Plugin │ │ │ │ │ │ │ │ ├── Cache │ │ │ │ │ │ │ │ │ ├── DenyRevalidationTest.php │ │ │ │ │ │ │ │ │ ├── SkipRevalidationTest.php │ │ │ │ │ │ │ │ │ └── DefaultCanCacheStrategyTest.php │ │ │ │ │ │ │ │ ├── Backoff │ │ │ │ │ │ │ │ │ ├── ConstantBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ ├── LinearBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ ├── ExponentialBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ ├── CallbackBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ ├── TruncatedBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ ├── ReasonPhraseBackoffStrategyTest.php │ │ │ │ │ │ │ │ │ └── CurlBackoffStrategyTest.php │ │ │ │ │ │ │ │ ├── CurlAuth │ │ │ │ │ │ │ │ │ └── CurlAuthPluginTest.php │ │ │ │ │ │ │ │ └── Cookie │ │ │ │ │ │ │ │ │ └── CookieJar │ │ │ │ │ │ │ │ │ └── FileCookieJarTest.php │ │ │ │ │ │ │ │ ├── Cache │ │ │ │ │ │ │ │ ├── NullCacheAdapterTest.php │ │ │ │ │ │ │ │ ├── Zf2CacheAdapterTest.php │ │ │ │ │ │ │ │ └── CacheAdapterFactoryTest.php │ │ │ │ │ │ │ │ ├── Parser │ │ │ │ │ │ │ │ ├── Cookie │ │ │ │ │ │ │ │ │ └── CookieParserTest.php │ │ │ │ │ │ │ │ ├── UriTemplate │ │ │ │ │ │ │ │ │ └── PeclUriTemplateTest.php │ │ │ │ │ │ │ │ ├── ParserRegistryTest.php │ │ │ │ │ │ │ │ └── Message │ │ │ │ │ │ │ │ │ └── PeclHttpMessageParserTest.php │ │ │ │ │ │ │ │ ├── Common │ │ │ │ │ │ │ │ ├── VersionTest.php │ │ │ │ │ │ │ │ ├── Exception │ │ │ │ │ │ │ │ │ └── BatchTransferExceptionTest.php │ │ │ │ │ │ │ │ └── EventTest.php │ │ │ │ │ │ │ │ ├── Batch │ │ │ │ │ │ │ │ ├── BatchSizeDivisorTest.php │ │ │ │ │ │ │ │ ├── HistoryBatchTest.php │ │ │ │ │ │ │ │ ├── BatchClosureDivisorTest.php │ │ │ │ │ │ │ │ ├── AbstractBatchDecoratorTest.php │ │ │ │ │ │ │ │ ├── FlushingBatchTest.php │ │ │ │ │ │ │ │ ├── NotifyingBatchTest.php │ │ │ │ │ │ │ │ ├── ExceptionBufferingBatchTest.php │ │ │ │ │ │ │ │ └── BatchClosureTransferTest.php │ │ │ │ │ │ │ │ ├── Log │ │ │ │ │ │ │ │ ├── ArrayLogAdapterTest.php │ │ │ │ │ │ │ │ ├── PsrLogAdapterTest.php │ │ │ │ │ │ │ │ ├── ClosureLogAdapterTest.php │ │ │ │ │ │ │ │ └── Zf2LogAdapterTest.php │ │ │ │ │ │ │ │ ├── Iterator │ │ │ │ │ │ │ │ ├── MapIteratorTest.php │ │ │ │ │ │ │ │ ├── FilterIteratorTest.php │ │ │ │ │ │ │ │ ├── AppendIteratorTest.php │ │ │ │ │ │ │ │ ├── MethodProxyIteratorTest.php │ │ │ │ │ │ │ │ └── ChunkedIteratorTest.php │ │ │ │ │ │ │ │ ├── Http │ │ │ │ │ │ │ │ ├── Exception │ │ │ │ │ │ │ │ │ └── CurlExceptionTest.php │ │ │ │ │ │ │ │ ├── MimetypesTest.php │ │ │ │ │ │ │ │ ├── QueryAggregator │ │ │ │ │ │ │ │ │ ├── PhpAggregatorTest.php │ │ │ │ │ │ │ │ │ ├── CommaAggregatorTest.php │ │ │ │ │ │ │ │ │ └── DuplicateAggregatorTest.php │ │ │ │ │ │ │ │ ├── Message │ │ │ │ │ │ │ │ │ └── Header │ │ │ │ │ │ │ │ │ │ └── HeaderFactoryTest.php │ │ │ │ │ │ │ │ ├── Curl │ │ │ │ │ │ │ │ │ └── CurlVersionTest.php │ │ │ │ │ │ │ │ ├── IoEmittingEntityBodyTest.php │ │ │ │ │ │ │ │ └── AbstractEntityBodyDecoratorTest.php │ │ │ │ │ │ │ │ └── Inflection │ │ │ │ │ │ │ │ ├── InflectorTest.php │ │ │ │ │ │ │ │ └── MemoizingInflectorTest.php │ │ │ │ │ │ └── bootstrap.php │ │ │ │ │ │ ├── phing │ │ │ │ │ │ ├── build.properties.dist │ │ │ │ │ │ └── imports │ │ │ │ │ │ │ └── dependencies.xml │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ ├── phar-stub.php │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── build.xml │ │ │ │ ├── symfony │ │ │ │ │ └── event-dispatcher │ │ │ │ │ │ └── Symfony │ │ │ │ │ │ └── Component │ │ │ │ │ │ └── EventDispatcher │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── Tests │ │ │ │ │ │ └── EventDispatcherTest.php │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ │ ├── Debug │ │ │ │ │ │ └── TraceableEventDispatcherInterface.php │ │ │ │ │ │ ├── phpunit.xml.dist │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ ├── composer.json │ │ │ │ │ │ └── EventSubscriberInterface.php │ │ │ │ ├── composer │ │ │ │ │ ├── autoload_psr4.php │ │ │ │ │ ├── autoload_classmap.php │ │ │ │ │ ├── autoload_namespaces.php │ │ │ │ │ └── autoload_real.php │ │ │ │ ├── autoload.php │ │ │ │ └── aws │ │ │ │ │ └── aws-sdk-php │ │ │ │ │ └── composer.json │ │ │ ├── composer.json │ │ │ └── composer.phar │ │ └── php.ini │ └── styles.css └── static │ ├── local │ └── formdata.js │ └── third-party │ └── json2 │ └── README ├── .jshintignore ├── client ├── js │ ├── version.js │ ├── iframe.xss.response.js │ ├── error │ │ └── error.js │ ├── blob-proxy.js │ ├── ui.handler.focus.filenameinput.js │ ├── s3 │ │ ├── jquery-plugin.js │ │ └── uploader.js │ ├── azure │ │ ├── jquery-plugin.js │ │ ├── rest │ │ │ └── delete-blob.js │ │ └── uploader.js │ ├── window.receive.message.js │ ├── ui.handler.focusin.filenameinput.js │ ├── paste.js │ ├── ui.handler.click.filename.js │ ├── ui.handler.events.js │ ├── upload-handler │ │ └── upload.handler.js │ └── ui.handler.click.filebuttons.js ├── edit.gif ├── pause.gif ├── retry.gif ├── trash.gif ├── loading.gif ├── continue.gif ├── processing.gif ├── placeholders │ ├── waiting-generic.png │ └── not_available-generic.png └── README.md ├── lib ├── grunt │ ├── tasks │ │ ├── index.js │ │ ├── server.js │ │ ├── dev.js │ │ ├── default.js │ │ ├── travis.js │ │ ├── minify.js │ │ ├── build_stripped.js │ │ ├── build.js │ │ ├── package.js │ │ ├── validate_pull_request.js │ │ └── tests.js │ ├── index.js │ ├── configs │ │ ├── jscs.js │ │ ├── jshint.js │ │ ├── static.js │ │ ├── stripcode.js │ │ ├── clean.js │ │ ├── bower.js │ │ ├── cssmin.js │ │ ├── shell.js │ │ ├── index.js │ │ ├── watch.js │ │ ├── banner.js │ │ ├── s3.js │ │ ├── version.js │ │ └── uglify.js │ └── utils.coffee ├── travis │ └── travis_print_logs.sh ├── karma │ ├── karma-local.conf.js │ ├── karma-travis.conf.js │ └── karma.conf.js └── browsers.coffee ├── .gitmodules ├── docs ├── _static │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ └── js │ │ └── main.js ├── _templates │ ├── footer.html │ ├── macros │ │ ├── github.html │ │ └── alerts.html │ ├── api.html │ ├── feature.html │ └── base.html ├── quickstart │ ├── 03-setting_up_server-azure.jmd │ ├── 03-setting_up_server-s3.jmd │ └── 03-setting_up_server.jmd ├── features │ ├── retry.jmd │ └── cancellable-uploads.jmd ├── modes │ ├── ui.jmd │ └── core.jmd └── api │ └── events-s3.jmd ├── .jscsrc ├── bower.json ├── CREDITS.txt ├── .gitignore ├── .travis.yml └── README.md /test/unit/resources/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/unit/resources/simpletext.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | client/js/third-party/*.js 2 | -------------------------------------------------------------------------------- /client/js/version.js: -------------------------------------------------------------------------------- 1 | /*global qq */ 2 | qq.version = "5.2.2"; 3 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_templates/leftbar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/dev/handlers/php.ini: -------------------------------------------------------------------------------- 1 | upload_max_filesize = 10M 2 | post_max_size = 10M -------------------------------------------------------------------------------- /lib/grunt/tasks/index.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = { 3 | }; 4 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/FileBody.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/edit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/edit.gif -------------------------------------------------------------------------------- /client/pause.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/pause.gif -------------------------------------------------------------------------------- /client/retry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/retry.gif -------------------------------------------------------------------------------- /client/trash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/trash.gif -------------------------------------------------------------------------------- /client/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/loading.gif -------------------------------------------------------------------------------- /client/continue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/continue.gif -------------------------------------------------------------------------------- /client/processing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/processing.gif -------------------------------------------------------------------------------- /test/dev/handlers/s3/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "aws/aws-sdk-php": "2.*" 4 | } 5 | } -------------------------------------------------------------------------------- /test/unit/resources/up.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/up.jpg -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | Sphinx>=1.2b1 2 | guzzle_sphinx_theme>=0.5.0 3 | -------------------------------------------------------------------------------- /test/unit/resources/down.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/down.jpg -------------------------------------------------------------------------------- /test/unit/resources/g04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/g04.bmp -------------------------------------------------------------------------------- /test/unit/resources/left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/left.jpg -------------------------------------------------------------------------------- /test/unit/resources/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/star.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "server"] 2 | path = server 3 | url = git://github.com/Widen/fine-uploader-server.git 4 | -------------------------------------------------------------------------------- /test/unit/resources/right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/right.jpg -------------------------------------------------------------------------------- /test/unit/resources/sample.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/sample.tif -------------------------------------------------------------------------------- /test/unit/resources/fearless.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/fearless.jpeg -------------------------------------------------------------------------------- /test/dev/handlers/s3/composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/dev/handlers/s3/composer.phar -------------------------------------------------------------------------------- /test/unit/resources/up-mirrored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/up-mirrored.jpg -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/mock_response: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Length: 0 3 | 4 | -------------------------------------------------------------------------------- /test/unit/resources/down-mirrored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/down-mirrored.jpg -------------------------------------------------------------------------------- /test/unit/resources/left-mirrored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/left-mirrored.jpg -------------------------------------------------------------------------------- /test/unit/resources/right-mirrored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/right-mirrored.jpg -------------------------------------------------------------------------------- /client/placeholders/waiting-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/placeholders/waiting-generic.png -------------------------------------------------------------------------------- /docs/_static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/docs/_static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": ["foo.json"] 3 | } 4 | -------------------------------------------------------------------------------- /test/unit/resources/GPN-2000-001635.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/GPN-2000-001635.jpg -------------------------------------------------------------------------------- /test/unit/resources/drop-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/drop-background.gif -------------------------------------------------------------------------------- /test/unit/resources/not-available_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/unit/resources/not-available_l.png -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/recursive.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": ["foo.json"] 3 | } 4 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /client/placeholders/not_available-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/client/placeholders/not_available-generic.png -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/description/baz.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": ["foo.json", "bar.json"] 3 | } 4 | -------------------------------------------------------------------------------- /docs/_static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/docs/_static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/_templates/footer.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_templates/macros/github.html: -------------------------------------------------------------------------------- 1 | {% macro issue(num) -%} 2 | #{{ num }} 3 | {%- endmacro %} 4 | -------------------------------------------------------------------------------- /lib/grunt/tasks/server.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask("server", ["nodestatic"]); 6 | }; 7 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_static/logo.png -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lite/fine-uploader/master/test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_static/guzzle-icon.png -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services 2 | .. toctree:: 3 | :hidden: 4 | 5 | docs.rst 6 | -------------------------------------------------------------------------------- /lib/grunt/index.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var configs = require("./configs"), 3 | tasks = require("./tasks"); 4 | 5 | module.exports = { 6 | configs: configs, 7 | tasks: tasks 8 | }; 9 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockSubject.php: -------------------------------------------------------------------------------- 1 | multiHandle; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json2.json: -------------------------------------------------------------------------------- 1 | { 2 | "services": { 3 | "foo": { 4 | "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", 5 | "extends": "abstract", 6 | "params": { 7 | "baz": "bar" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /client/js/error/error.js: -------------------------------------------------------------------------------- 1 | /* globals qq */ 2 | /** 3 | * Fine Uploader top-level Error container. Inherits from `Error`. 4 | */ 5 | (function() { 6 | "use strict"; 7 | 8 | qq.Error = function(message) { 9 | this.message = "[Fine Uploader " + qq.version + "] " + message; 10 | }; 11 | 12 | qq.Error.prototype = new Error(); 13 | }()); 14 | -------------------------------------------------------------------------------- /lib/travis/travis_print_logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOG_FILES=$LOGS_DIR/* 4 | 5 | for FILE in $LOG_FILES; do 6 | echo -e "\n\n\n" 7 | echo "================================================================================" 8 | echo " $FILE" 9 | echo "================================================================================" 10 | cat $FILE 11 | done 12 | -------------------------------------------------------------------------------- /lib/grunt/tasks/travis.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask( 6 | "travis", 7 | "Test with Travis CI", 8 | [ 9 | "validate_pull_request", 10 | "dev", 11 | "test:travis", 12 | "release-travis" 13 | ]); 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_templates/nav_links.html: -------------------------------------------------------------------------------- 1 |
  • Docs
  • 2 |
  • API
  • 3 |
  • GitHub
  • 4 |
  • Forum
  • 5 |
  • IRC
  • 6 | -------------------------------------------------------------------------------- /docs/_templates/base.html: -------------------------------------------------------------------------------- 1 | {% from "_templates/macros/code.html" import options_table, events_table, methods_table, code_table, api_method, api_parent_option, api_option, api_event, api_links, label %} 2 | {% from "_templates/macros/alerts.html" import alert, label %} 3 | {% from "_templates/macros/github.html" import issue %} 4 | {% extends "_templates/layout.html" %} 5 | {% block content %}{% endblock %} 6 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/plugins-list.rst.inc: -------------------------------------------------------------------------------- 1 | * :doc:`/plugins/async-plugin` 2 | * :doc:`/plugins/backoff-plugin` 3 | * :doc:`/plugins/cache-plugin` 4 | * :doc:`/plugins/cookie-plugin` 5 | * :doc:`/plugins/history-plugin` 6 | * :doc:`/plugins/log-plugin` 7 | * :doc:`/plugins/md5-validator-plugin` 8 | * :doc:`/plugins/mock-plugin` 9 | * :doc:`/plugins/oauth-plugin` 10 | -------------------------------------------------------------------------------- /lib/grunt/configs/jscs.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | 5 | return { 6 | src: [paths.src + "/js/**/*.js", 7 | "./*.js", 8 | "./lib/**/*.js", 9 | "!" + paths.src + "/js/third-party/**/*.js" 10 | ], 11 | tests: [], 12 | options: { 13 | config: ".jscsrc" 14 | } 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /lib/grunt/configs/jshint.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | source: ["" + paths.src + "/js/**/*.js"], 6 | tests: ["" + paths.test + "/unit/**/*.js", "" + paths.test + "/static/local/*.js"], 7 | options: { 8 | jshintrc: true, 9 | ignores: ["" + paths.src + "/js/third-party/**/*.js"] 10 | } 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /lib/grunt/configs/static.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | server: { 6 | options: { 7 | port: 3000, 8 | base: paths.test + "/unit/resources", 9 | headers: { 10 | "Access-Control-Allow-Origin": "*" 11 | } 12 | } 13 | } 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /lib/grunt/configs/stripcode.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | options: { 6 | // jscs:disable requireCamelCaseOrUpperCaseIdentifiers 7 | start_comment: "", 8 | end_comment: "" 9 | }, 10 | build: { 11 | src: "" + paths.build + "/**/*.js" 12 | } 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /test/dev/styles.css: -------------------------------------------------------------------------------- 1 | H1 { 2 | text-align: center; 3 | } 4 | 5 | #examples { 6 | padding-left: 10px; 7 | } 8 | 9 | .endingRemark { 10 | margin-top: 30px; 11 | } 12 | 13 | DIV.example { 14 | margin-top: 50px; 15 | } 16 | 17 | DIV.example ul { 18 | width: 650px; 19 | } 20 | 21 | A { 22 | color: green; 23 | } 24 | 25 | A.decorate { 26 | text-decoration: underline; 27 | } 28 | 29 | #paste-test-img { width: 125px; } -------------------------------------------------------------------------------- /lib/karma/karma-local.conf.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var sharedConfig = require("./karma.conf"); 3 | 4 | module.exports = function(config, options) { 5 | "use strict"; 6 | if (options == null) { 7 | options = {}; 8 | } 9 | sharedConfig(config); 10 | return config.set({ 11 | testName: "[local] FineUploader: tests", 12 | logFile: "fineuploader.log", 13 | autoWatch: true 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /lib/grunt/tasks/minify.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask( 6 | "minify", 7 | "Minify the source javascript and css", 8 | [ 9 | "cssmin:all", 10 | "uglify:core", 11 | "uglify:jquery", 12 | "uglify:coreS3", 13 | "uglify:jqueryS3", 14 | "uglify:jqueryAzure", 15 | "uglify:coreAzure", 16 | "uglify:all" 17 | ]); 18 | }; 19 | -------------------------------------------------------------------------------- /lib/grunt/configs/clean.js: -------------------------------------------------------------------------------- 1 | /* jshint node:true */ 2 | /* globals module */ 3 | var path = require("path"); 4 | 5 | module.exports = function(paths) { 6 | "use strict"; 7 | return { 8 | build: { 9 | files: { src: paths.build } 10 | }, 11 | 12 | dist: { 13 | files: { src: paths.dist } 14 | }, 15 | 16 | test: { 17 | files: { src: path.join(paths.test, "_temp*") } 18 | 19 | } 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/grunt/tasks/build_stripped.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask( 6 | "build_stripped", 7 | "Build from latest source w/ test artifacts stripped out", 8 | [ 9 | "concat", 10 | "strip_code:build", 11 | "minify", 12 | "usebanner:allhead", 13 | "usebanner:allfoot", 14 | "copy:images" 15 | ]); 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | Do not add files from this directory into your project. Please visit the 2 | downloads page for zips that contain combined and version-stamped javascript 3 | and css files, along with all required resources. 4 | 5 | # Download 6 | To download a pre-packaged version of Fine Uploader visit: http://fineuploader.com/downloads.html 7 | 8 | # Build 9 | For instructions on building your own packaged version of Fine Uploader visit: http://docs.fineuploader.com/contributing.htm 10 | 11 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | <%= grunt.template.today('yyyy-mm-dd') %> */\n", 7 | report: "min" 8 | }, 9 | all: { 10 | expand: true, 11 | cwd: paths.build, 12 | src: ["*.css", "!*.min.css"], 13 | dest: paths.build, 14 | ext: ".min.css" 15 | } 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/phing/build.properties.dist: -------------------------------------------------------------------------------- 1 | # you may need to update this if you're working on a fork. 2 | guzzle.remote=git@github.com:guzzle/guzzle.git 3 | 4 | # github credentials -- only used by GitHub API calls to create subtree repos 5 | github.basicauth=username:password 6 | # for the subtree split and testing 7 | github.org=guzzle 8 | 9 | # your git path 10 | cmd.git=git 11 | 12 | # your composer command 13 | cmd.composer=composer 14 | 15 | # test server start 16 | cmd.testserver=node 17 | -------------------------------------------------------------------------------- /CREDITS.txt: -------------------------------------------------------------------------------- 1 | Third-party credits (client/js/third-party/) 2 | 3 | MegaPixImage module 4 | Licensed under MIT (https://github.com/stomita/ios-imagefile-megapixel/blob/master/LICENSE) 5 | https://github.com/stomita/ios-imagefile-megapixel 6 | Copyright (c) 2012 Shinichi Tomita 7 | 8 | CryptoJS 9 | Licensed under the New BSD License (http://opensource.org/licenses/BSD-3-Clause) 10 | https://code.google.com/p/crypto-js/ 11 | Copyright (c) 2009-2013 Jeff Mott 12 | -------------------------------------------------------------------------------- /lib/grunt/tasks/build.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask( 6 | "build", 7 | "Build from latest source", 8 | [ 9 | "jshint:source", 10 | "jshint:tests", 11 | "jscs:src", 12 | "jscs:tests", 13 | "concat", 14 | "minify", 15 | "usebanner:allhead", 16 | "usebanner:allfoot", 17 | "copy:images" 18 | ]); 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/symfony/event-dispatcher'), 10 | 'Guzzle\\Tests' => array($vendorDir . '/guzzle/guzzle/tests'), 11 | 'Guzzle' => array($vendorDir . '/guzzle/guzzle/src'), 12 | 'Aws' => array($vendorDir . '/aws/aws-sdk-php/src'), 13 | ); 14 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/.gitignore: -------------------------------------------------------------------------------- 1 | # Ingore common cruft 2 | .DS_STORE 3 | coverage 4 | .idea 5 | 6 | # Ignore binary files 7 | guzzle.phar 8 | guzzle-min.phar 9 | 10 | # Ignore potentially sensitive phpunit file 11 | phpunit.xml 12 | 13 | # Ignore composer generated files 14 | composer.phar 15 | composer.lock 16 | composer-test.lock 17 | vendor/ 18 | 19 | # Ignore build files 20 | build/ 21 | phing/build.properties 22 | 23 | # Ignore subsplit working directory 24 | .subsplit 25 | 26 | docs/_build 27 | docs/*.pyc 28 | -------------------------------------------------------------------------------- /lib/grunt/configs/shell.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | // jscs:disable requireCamelCaseOrUpperCaseIdentifiers 6 | version_dist_templates: { 7 | command: "find " + paths.dist + "/ -type f -name '*.html' | xargs sed -i '' 's/{VERSION}/<%= pkg.version %>/'", 8 | options: { 9 | cwd: __dirname, 10 | stderr: true, 11 | stdout: true 12 | } 13 | } 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - hhvm 9 | 10 | before_script: 11 | - curl --version 12 | - pecl install uri_template-beta || echo "pecl uri_template not available" 13 | - composer self-update 14 | - composer install --no-interaction --prefer-source --dev 15 | - ~/.nvm/nvm.sh install v0.6.14 16 | 17 | script: vendor/bin/phpunit 18 | 19 | matrix: 20 | allow_failures: 21 | - php: 5.6 22 | - php: hhvm 23 | fast_finish: true 24 | -------------------------------------------------------------------------------- /client/js/blob-proxy.js: -------------------------------------------------------------------------------- 1 | /* globals qq */ 2 | /** 3 | * Placeholder for a Blob that will be generated on-demand. 4 | * 5 | * @param referenceBlob Parent of the generated blob 6 | * @param onCreate Function to invoke when the blob must be created. Must be promissory. 7 | * @constructor 8 | */ 9 | qq.BlobProxy = function(referenceBlob, onCreate) { 10 | "use strict"; 11 | 12 | qq.extend(this, { 13 | referenceBlob: referenceBlob, 14 | 15 | create: function() { 16 | return onCreate(referenceBlob); 17 | } 18 | }); 19 | }; 20 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/ValidationExceptionTest.php: -------------------------------------------------------------------------------- 1 | setErrors($errors); 15 | $this->assertEquals($errors, $e->getErrors()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/karma/karma-travis.conf.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var sharedConfig = require("./karma.conf"); 3 | 4 | module.exports = function(config, options) { 5 | "use strict"; 6 | 7 | if (options == null) { 8 | options = {}; 9 | } 10 | sharedConfig(config); 11 | return config.set({ 12 | testName: "[travis] Fine Uploader tests", 13 | logFile: "fineuploader-travis.log", 14 | singleRun: true, 15 | autoWatch: false, 16 | transports: ["xhr-polling"], 17 | browsers: ["PhantomJS", "Firefox"] 18 | }); 19 | }; 20 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/AbstractCommandTest.php: -------------------------------------------------------------------------------- 1 | setDescription(ServiceDescription::factory(__DIR__ . '/../../TestData/test_service.json')); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/services/json1.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": [ "json2.json" ], 3 | "services": { 4 | "abstract": { 5 | "access_key": "xyz", 6 | "secret": "abc" 7 | }, 8 | "mock": { 9 | "class": "Guzzle\\Tests\\Service\\Mock\\MockClient", 10 | "extends": "abstract", 11 | "params": { 12 | "username": "foo", 13 | "password": "baz", 14 | "subdomain": "bar" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Exception/InconsistentClientTransferExceptionTest.php: -------------------------------------------------------------------------------- 1 | assertEquals($items, $e->getCommands()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /client/js/ui.handler.focus.filenameinput.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | /** 3 | * Child of FilenameInputFocusInHandler. Used to detect focus events on file edit input elements. This child module is only 4 | * needed for UAs that do not support the focusin event. Currently, only Firefox lacks this event. 5 | * 6 | * @param spec Overrides for default specifications 7 | */ 8 | qq.FilenameInputFocusHandler = function(spec) { 9 | "use strict"; 10 | 11 | spec.eventType = "focus"; 12 | spec.attachTo = null; 13 | 14 | qq.extend(this, new qq.FilenameInputFocusInHandler(spec, {})); 15 | }; 16 | -------------------------------------------------------------------------------- /lib/grunt/tasks/package.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask( 6 | "package", 7 | "Build a zipped distribution-worthy version", 8 | [ 9 | "build_stripped", 10 | "copy:dist", 11 | "shell:version_dist_templates", 12 | "compress:jquery", 13 | "compress:jqueryS3", 14 | "compress:jqueryAzure", 15 | "compress:core", 16 | "compress:coreS3", 17 | "compress:coreAzure" 18 | ]); 19 | }; 20 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/CustomResponseModel.php: -------------------------------------------------------------------------------- 1 | command = $command; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/_static/js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Resize the dropdown-menu's to be 80% of the window height, and 3 | * add an overflow-y property so that all the elements are shown. 4 | */ 5 | $(function() { 6 | 'use strict'; 7 | 8 | var setDropdownHeight = function(){ 9 | 10 | var dropdownHeight = $(window.top).height() * .80; // take 80% of the current window height 11 | $('.dropdown-menu').css('max-height', dropdownHeight); 12 | $('.dropdown-menu').css('overflow-y', 'auto'); 13 | 14 | }; 15 | 16 | $(window).resize(setDropdownHeight); 17 | setDropdownHeight(); 18 | }); 19 | -------------------------------------------------------------------------------- /lib/grunt/configs/index.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = { 3 | banner: require("./banner"), 4 | clean: require("./clean"), 5 | compress: require("./compress"), 6 | concat: require("./concat"), 7 | copy: require("./copy"), 8 | cssmin: require("./cssmin"), 9 | jshint: require("./jshint"), 10 | jscs: require("./jscs"), 11 | s3: require("./s3"), 12 | shell: require("./shell"), 13 | static: require("./static"), 14 | stripcode: require("./stripcode"), 15 | uglify: require("./uglify"), 16 | version: require("./version"), 17 | watch: require("./watch") 18 | }; 19 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DenyRevalidationTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($deny->revalidate(new Request('GET', 'http://foo.com'), new Response(200))); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/SkipRevalidationTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($skip->revalidate(new Request('GET', 'http://foo.com'), new Response(200))); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | *.ipr 3 | *~ 4 | .*.sw[a-z] 5 | *.iml 6 | !.gitignore 7 | !.jshintrc 8 | !.jshintignore 9 | Thumbs.db 10 | 11 | _build/ 12 | _dist/ 13 | *.zip 14 | release/* 15 | master 16 | 17 | !.travis.yml 18 | hardcopy* 19 | selenium.log* 20 | 21 | pid.txt 22 | 23 | fine-uploader/ 24 | test/upload/* 25 | test/uploadsTemp/ 26 | test/coverage/* 27 | test/vendor/* 28 | test/uploads/* 29 | test/temp* 30 | test/_temp* 31 | test/_vendor* 32 | node_modules/ 33 | 34 | bin/ 35 | 36 | build/ 37 | 38 | src 39 | 40 | npm-debug.log 41 | 42 | test/dev/handlers/s3/composer.lock 43 | test/dev/handlers/traditional/files 44 | test/dev/handlers/traditional/chunks 45 | s3keys.php -------------------------------------------------------------------------------- /lib/grunt/tasks/validate_pull_request.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(grunt) { 3 | "use strict"; 4 | 5 | grunt.registerTask("validate_pull_request", "", function() { 6 | if (process.env.TRAVIS_BRANCH === "master" && process.env.TRAVIS_PULL_REQUEST !== "false") { 7 | return grunt.fail.fatal( 8 | "Woah there, buddy! " + 9 | "Pull requests should be\nbranched from develop!\n\n" + 10 | "Details on contributing pull requests found here: \n\n" + 11 | "https://github.com/Widen/fine-uploader/blob/master/CONTRIBUTING.md\n" 12 | ); 13 | } 14 | }); 15 | }; 16 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/NullCacheAdapterTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(false, $c->contains('foo')); 16 | $this->assertEquals(true, $c->delete('foo')); 17 | $this->assertEquals(false, $c->fetch('foo')); 18 | $this->assertEquals(true, $c->save('foo', 'bar')); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/karma/karma.conf.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var modules = require("../modules"), 3 | allBrowsers = require("../browsers"); 4 | 5 | module.exports = function(config, options) { 6 | "use strict"; 7 | 8 | if (options == null) { 9 | options = {}; 10 | } 11 | return config.set({ 12 | files: modules.mergeModules(true, "karmaModules", "fuSrcBuild", "fuIframeXssResponse", "testHelperModules", "fuUnit"), 13 | basePath: "../..", 14 | logLevel: config.LOG_INFO, 15 | logColors: true, 16 | frameworks: ["mocha"], 17 | reporters: ["spec"], 18 | captureTimeout: 60000, 19 | colors: true 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /docs/quickstart/03-setting_up_server-azure.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Server Set-Up Azure" %} 3 | 4 | {% block content %} 5 | {% markdown %} 6 | # Server Set-Up Azure Blob Storage {: .page-header} 7 | 8 | We have provided a [sample C# endpoint handler for Fine Uploader Azure][csharp]. If you would like 9 | to develop your own endpoint handler, or modify the example, you should read about [handling 10 | Fine Uploader Azure requests][azureserver] first. 11 | 12 | [csharp]: https://github.com/Widen/fine-uploader-server/tree/master/C%23/azure 13 | [azureserver]: ../endpoint_handlers/azure.html 14 | 15 | {% endmarkdown %} 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/phar-stub.php: -------------------------------------------------------------------------------- 1 | registerNamespaces(array( 9 | 'Guzzle' => 'phar://guzzle.phar/src', 10 | 'Symfony\\Component\\EventDispatcher' => 'phar://guzzle.phar/vendor/symfony/event-dispatcher', 11 | 'Doctrine' => 'phar://guzzle.phar/vendor/doctrine/common/lib', 12 | 'Monolog' => 'phar://guzzle.phar/vendor/monolog/monolog/src' 13 | )); 14 | $classLoader->register(); 15 | 16 | __HALT_COMPILER(); 17 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\EventDispatcher\Tests; 13 | 14 | use Symfony\Component\EventDispatcher\EventDispatcher; 15 | 16 | class EventDispatcherTest extends AbstractEventDispatcherTest 17 | { 18 | protected function createEventDispatcher() 19 | { 20 | return new EventDispatcher(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Cookie/CookieParserTest.php: -------------------------------------------------------------------------------- 1 | parseCookie('foo=baz+bar', null, null, true); 18 | $this->assertEquals(array( 19 | 'foo' => 'baz bar' 20 | ), $result['cookies']); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/VersionTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(3, $d->getSize()); 20 | $d->setSize(2); 21 | $batches = $d->createBatches($queue); 22 | $this->assertEquals(array(array('foo', 'baz'), array('bar')), $batches); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ArrayLogAdapterTest.php: -------------------------------------------------------------------------------- 1 | log('test', \LOG_NOTICE, '127.0.0.1'); 13 | $this->assertEquals(array(array('message' => 'test', 'priority' => \LOG_NOTICE, 'extras' => '127.0.0.1')), $adapter->getLogs()); 14 | } 15 | 16 | public function testClearLog() 17 | { 18 | $adapter = new ArrayLogAdapter(); 19 | $adapter->log('test', \LOG_NOTICE, '127.0.0.1'); 20 | $adapter->clearLogs(); 21 | $this->assertEquals(array(), $adapter->getLogs()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/PsrLogAdapterTest.php: -------------------------------------------------------------------------------- 1 | pushHandler($handler); 20 | $adapter = new PsrLogAdapter($log); 21 | $adapter->log('test!', LOG_INFO); 22 | $this->assertTrue($handler->hasInfoRecords()); 23 | $this->assertSame($log, $adapter->getLogObject()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php: -------------------------------------------------------------------------------- 1 | command = $command; 22 | $this->response = $response; 23 | $this->message = 'Error from ' . $response; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /docs/features/retry.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Retrying Uploads" %} 3 | {% block sidebar %} 4 | {{ api_links(options=['retry', 'retry-ui'], methods=['retry'], events=['autoRetry', 'manualRetry']) }} 5 | {% endblock %} 6 | {% block content %} 7 | {% markdown %} 8 | 9 | # Retrying Uploads {: .page-header } 10 | 11 | Fine Uploader will automatically attempt to retry an upload if the `enableAuto` option is set to `true`: 12 | 13 | ```javascript 14 | var uploader = new qq.FineUploader({ 15 | /* other required config options left out for brevity */ 16 | 17 | retry: { 18 | enableAuto: true 19 | }, 20 | callbacks: { 21 | onRetry: function(id, name, attemptNumber) { 22 | ... 23 | } 24 | } 25 | }); 26 | ``` 27 | 28 | {% endmarkdown %} 29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/_static/prettify.css: -------------------------------------------------------------------------------- 1 | .com { 2 | color: #93A1A1; 3 | } 4 | .lit { 5 | color: #195F91; 6 | } 7 | .pun, .opn, .clo { 8 | color: #93A1A1; 9 | } 10 | .fun { 11 | color: #DC322F; 12 | } 13 | .str, .atv { 14 | color: #DD1144; 15 | } 16 | .kwd, .linenums .tag { 17 | color: #1E347B; 18 | } 19 | .typ, .atn, .dec, .var { 20 | color: teal; 21 | } 22 | .pln { 23 | color: #48484C; 24 | } 25 | .prettyprint { 26 | background-color: #F7F7F9; 27 | border: 1px solid #E1E1E8; 28 | padding: 8px; 29 | } 30 | .prettyprint.linenums { 31 | box-shadow: 40px 0 0 #FBFBFC inset, 41px 0 0 #ECECF0 inset; 32 | } 33 | ol.linenums { 34 | margin: 0 0 0 33px; 35 | } 36 | ol.linenums li { 37 | color: #BEBEC5; 38 | line-height: 18px; 39 | padding-left: 12px; 40 | text-shadow: 0 1px 0 #FFFFFF; 41 | } 42 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MapIteratorTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(range(0, 1000, 10), iterator_to_array($i, false)); 19 | } 20 | 21 | /** 22 | * @expectedException \InvalidArgumentException 23 | */ 24 | public function testValidatesCallable() 25 | { 26 | $i = new MapIterator(new \ArrayIterator(), new \stdClass()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ConstantBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($strategy->makesDecision()); 16 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 17 | $this->assertEquals(3.5, $strategy->getBackoffPeriod(0, $request)); 18 | $this->assertEquals(3.5, $strategy->getBackoffPeriod(1, $request)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md: -------------------------------------------------------------------------------- 1 | EventDispatcher Component 2 | ========================= 3 | 4 | The Symfony EventDispatcher component implements the Mediator pattern in a 5 | simple and effective way to make your projects truly extensible. 6 | 7 | ```php 8 | use Symfony\Component\EventDispatcher\EventDispatcher; 9 | use Symfony\Component\EventDispatcher\Event; 10 | 11 | $dispatcher = new EventDispatcher(); 12 | 13 | $dispatcher->addListener('event_name', function (Event $event) { 14 | // ... 15 | }); 16 | 17 | $dispatcher->dispatch('event_name'); 18 | ``` 19 | 20 | Resources 21 | --------- 22 | 23 | You can run the unit tests with the following command: 24 | 25 | $ cd path/to/Symfony/Component/EventDispatcher/ 26 | $ composer.phar install 27 | $ phpunit 28 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/FilterIteratorTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(range(1, 99, 2), iterator_to_array($i, false)); 19 | } 20 | 21 | /** 22 | * @expectedException \InvalidArgumentException 23 | */ 24 | public function testValidatesCallable() 25 | { 26 | $i = new FilterIterator(new \ArrayIterator(), new \stdClass()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/BodyVisitorTest.php: -------------------------------------------------------------------------------- 1 | 'body', 'name' => 'foo')); 18 | $visitor->visit($this->command, $this->response, $param, $this->value); 19 | $this->assertEquals('Foo', (string) $this->value['foo']); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/AppendIteratorTest.php: -------------------------------------------------------------------------------- 1 | 1, 16 | 'b' => 2 17 | )); 18 | $b = new \ArrayIterator(array()); 19 | $c = new \ArrayIterator(array( 20 | 'c' => 3, 21 | 'd' => 4 22 | )); 23 | $i = new AppendIterator(); 24 | $i->append($a); 25 | $i->append($b); 26 | $i->append($c); 27 | $this->assertEquals(array(1, 2, 3, 4), iterator_to_array($i, false)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 2.5.0 5 | ----- 6 | 7 | * added Debug\TraceableEventDispatcher (originally in HttpKernel) 8 | * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface 9 | * added RegisterListenersPass (originally in HttpKernel) 10 | 11 | 2.1.0 12 | ----- 13 | 14 | * added TraceableEventDispatcherInterface 15 | * added ContainerAwareEventDispatcher 16 | * added a reference to the EventDispatcher on the Event 17 | * added a reference to the Event name on the event 18 | * added fluid interface to the dispatch() method which now returns the Event 19 | object 20 | * added GenericEvent event class 21 | * added the possibility for subscribers to subscribe several times for the 22 | same event 23 | * added ImmutableEventDispatcher 24 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/async-plugin.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Async plugin 3 | ============ 4 | 5 | The AsyncPlugin allows you to send requests that do not wait on a response. This is handled through cURL by utilizing 6 | the progress event. When a request has sent all of its data to the remote server, Guzzle adds a 1ms timeout on the 7 | request and instructs cURL to not download the body of the response. The async plugin then catches the exception and 8 | adds a mock response to the request, along with an X-Guzzle-Async header to let you know that the response was not 9 | fully downloaded. 10 | 11 | .. code-block:: php 12 | 13 | use Guzzle\Http\Client; 14 | use Guzzle\Plugin\Async\AsyncPlugin; 15 | 16 | $client = new Client('http://www.example.com'); 17 | $client->addSubscriber(new AsyncPlugin()); 18 | $response = $client->get()->send(); 19 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/history-plugin.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | History plugin 3 | ============== 4 | 5 | The history plugin tracks all of the requests and responses sent through a request or client. This plugin can be 6 | useful for crawling or unit testing. By default, the history plugin stores up to 10 requests and responses. 7 | 8 | .. code-block:: php 9 | 10 | use Guzzle\Http\Client; 11 | use Guzzle\Plugin\History\HistoryPlugin; 12 | 13 | $client = new Client('http://www.test.com/'); 14 | 15 | // Add the history plugin to the client object 16 | $history = new HistoryPlugin(); 17 | $history->setLimit(5); 18 | $client->addSubscriber($history); 19 | 20 | $client->get('http://www.yahoo.com/')->send(); 21 | 22 | echo $history->getLastRequest(); 23 | echo $history->getLastResponse(); 24 | echo count($history); 25 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/HistoryBatchTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Batch\BatchTransferInterface'), 17 | $this->getMock('Guzzle\Batch\BatchDivisorInterface') 18 | ); 19 | 20 | $history = new HistoryBatch($batch); 21 | $history->add('foo')->add('baz'); 22 | $this->assertEquals(array('foo', 'baz'), $history->getHistory()); 23 | $history->clearHistory(); 24 | $this->assertEquals(array(), $history->getHistory()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/ResponseBodyVisitorTest.php: -------------------------------------------------------------------------------- 1 | getNestedCommand('response_body')->getParam('foo'); 16 | $visitor->visit($this->command, $this->request, $param, sys_get_temp_dir() . '/foo.txt'); 17 | $body = $this->readAttribute($this->request, 'responseBody'); 18 | $this->assertContains('/foo.txt', $body->getUri()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/StatusCodeVisitorTest.php: -------------------------------------------------------------------------------- 1 | 'statusCode', 'name' => 'code')); 18 | $visitor->visit($this->command, $this->response, $param, $this->value); 19 | $this->assertEquals(200, $this->value['code']); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/LinearBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($strategy->makesDecision()); 16 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 17 | $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request)); 18 | $this->assertEquals(5, $strategy->getBackoffPeriod(1, $request)); 19 | $this->assertEquals(10, $strategy->getBackoffPeriod(2, $request)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('uri_template PECL extension must be installed to test PeclUriTemplate'); 16 | } 17 | } 18 | 19 | /** 20 | * @dataProvider templateProvider 21 | */ 22 | public function testExpandsUriTemplates($template, $expansion, $params) 23 | { 24 | $uri = new PeclUriTemplate($template); 25 | $this->assertEquals($expansion, $uri->expand($template, $params)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/ReasonPhraseVisitorTest.php: -------------------------------------------------------------------------------- 1 | 'reasonPhrase', 'name' => 'phrase')); 18 | $visitor->visit($this->command, $this->response, $param, $this->value); 19 | $this->assertEquals('OK', $this->value['phrase']); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/grunt/configs/banner.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | allhead: { 6 | src: ["" + paths.build + "/*.{js,css}"], 7 | options: { 8 | position: "top", 9 | banner: "/*!\n* <%= pkg.title %>\n*\n* Copyright 2015, <%= pkg.author %> info@fineuploader.com\n*\n* Version: <%= pkg.version %>\n*\n* Homepage: http://fineuploader.com\n*\n* Repository: <%= pkg.repository.url %>\n*\n* Licensed only under the Widen Commercial License (http://fineuploader.com/licensing).\n*/ \n\n" 10 | } 11 | }, 12 | allfoot: { 13 | src: ["" + paths.build + "/*.{js,css}"], 14 | options: { 15 | position: "bottom", 16 | banner: "/*! <%= grunt.template.today('yyyy-mm-dd') %> */\n" 17 | } 18 | } 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Response/AbstractResponseVisitorTest.php: -------------------------------------------------------------------------------- 1 | value = array(); 22 | $this->command = new MockCommand(); 23 | $this->response = new Response(200, array( 24 | 'X-Foo' => 'bar', 25 | 'Content-Length' => 3, 26 | 'Content-Type' => 'text/plain' 27 | ), 'Foo'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Exception/CurlExceptionTest.php: -------------------------------------------------------------------------------- 1 | assertNull($e->getError()); 17 | $this->assertNull($e->getErrorNo()); 18 | $this->assertSame($e, $e->setError('test', 12)); 19 | $this->assertEquals('test', $e->getError()); 20 | $this->assertEquals(12, $e->getErrorNo()); 21 | 22 | $handle = new CurlHandle(curl_init(), array()); 23 | $e->setCurlHandle($handle); 24 | $this->assertSame($handle, $e->getCurlHandle()); 25 | $handle->close(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/features/cancellable-uploads.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Cancellable Uploads" %} 3 | {% block sidebar %} 4 | {{ api_links(None, ['cancel', 'cancelAll'], ['cancel']) }} 5 | {% endblock %} 6 | 7 | {% block content %} 8 | {% markdown %} 9 | 10 | # Cancellable Uploads {: .page-header } 11 | 12 | Fine Uploader allows file uploads to be cancelled via the API or the UI. 13 | 14 | Uploads can be canceled programmatically by calling the [`cancel`](../api/methods.html#cancel) or [`cancelAll`](../api/methods.html#cancelAll) API methods. 15 | The ['cancel'](../api/events.html#cancel) event will be fired and handled by a callback whenever an item is canceled. 16 | 17 | In [UI mode](../modes/ui.html), The cancel button will appear if [included in the template](../features/styling.html) 18 | In Fine Uploader UI mode, cancelling an upload will remove that element from the DOM as well. 19 | 20 | 21 | {% endmarkdown %} 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/MimetypesTest.php: -------------------------------------------------------------------------------- 1 | assertEquals('text/x-php', Mimetypes::getInstance()->fromExtension('php')); 15 | } 16 | 17 | public function testGetsFromFilename() 18 | { 19 | $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(__FILE__)); 20 | } 21 | 22 | public function testGetsFromCaseInsensitiveFilename() 23 | { 24 | $this->assertEquals('text/x-php', Mimetypes::getInstance()->fromFilename(strtoupper(__FILE__))); 25 | } 26 | 27 | public function testReturnsNullWhenNoMatchFound() 28 | { 29 | $this->assertNull(Mimetypes::getInstance()->fromExtension('foobar')); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/PhpAggregatorTest.php: -------------------------------------------------------------------------------- 1 | useUrlEncoding(false); 14 | $a = new Ag(); 15 | $key = 't'; 16 | $value = array( 17 | 'v1' => 'a', 18 | 'v2' => 'b', 19 | 'v3' => array( 20 | 'v4' => 'c', 21 | 'v5' => 'd', 22 | ) 23 | ); 24 | $result = $a->aggregate($key, $value, $query); 25 | $this->assertEquals(array( 26 | 't[v1]' => 'a', 27 | 't[v2]' => 'b', 28 | 't[v3][v4]' => 'c', 29 | 't[v3][v5]' => 'd', 30 | ), $result); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ClosureLogAdapterTest.php: -------------------------------------------------------------------------------- 1 | adapter = new ClosureLogAdapter(function($message, $priority, $extras = null) use ($that, &$modified) { 17 | $modified = array($message, $priority, $extras); 18 | }); 19 | $this->adapter->log('test', LOG_NOTICE, '127.0.0.1'); 20 | $this->assertEquals(array('test', LOG_NOTICE, '127.0.0.1'), $modified); 21 | } 22 | 23 | /** 24 | * @expectedException InvalidArgumentException 25 | */ 26 | public function testThrowsExceptionWhenNotCallable() 27 | { 28 | $this->adapter = new ClosureLogAdapter(123); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/OtherCommand.php: -------------------------------------------------------------------------------- 1 | 'other_command', 13 | 'parameters' => array( 14 | 'test' => array( 15 | 'default' => '123', 16 | 'required' => true, 17 | 'doc' => 'Test argument' 18 | ), 19 | 'other' => array(), 20 | 'arg' => array('type' => 'string'), 21 | 'static' => array('static' => true, 'default' => 'this is static') 22 | ) 23 | )); 24 | } 25 | 26 | protected function build() 27 | { 28 | $this->request = $this->client->getRequest('HEAD'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/ParserRegistryTest.php: -------------------------------------------------------------------------------- 1 | registerParser('foo', $c); 17 | $this->assertSame($c, $r->getParser('foo')); 18 | } 19 | 20 | public function testReturnsNullWhenNotFound() 21 | { 22 | $r = new ParserRegistry(); 23 | $this->assertNull($r->getParser('FOO')); 24 | } 25 | 26 | public function testReturnsLazyLoadedDefault() 27 | { 28 | $r = new ParserRegistry(); 29 | $c = $r->getParser('cookie'); 30 | $this->assertInstanceOf('Guzzle\Parser\Cookie\CookieParser', $c); 31 | $this->assertSame($c, $r->getParser('cookie')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /client/js/s3/jquery-plugin.js: -------------------------------------------------------------------------------- 1 | /*globals jQuery*/ 2 | /** 3 | * Simply an alias for the `fineUploader` plug-in wrapper, but hides the required `endpointType` option from the 4 | * integrator. I thought it may be confusing to convey to the integrator that, when using Fine Uploader in S3 mode, 5 | * you need to specify an `endpointType` with a value of S3, and perhaps an `uploaderType` with a value of "basic" if 6 | * you want to use basic mode when uploading directly to S3 as well. So, you can use this plug-in alias and not worry 7 | * about the `endpointType` option at all. 8 | */ 9 | (function($) { 10 | "use strict"; 11 | 12 | $.fn.fineUploaderS3 = function(optionsOrCommand) { 13 | if (typeof optionsOrCommand === "object") { 14 | 15 | // This option is used to tell the plug-in wrapper to instantiate the appropriate S3-namespace modules. 16 | optionsOrCommand.endpointType = "s3"; 17 | } 18 | 19 | return $.fn.fineUploader.apply(this, arguments); 20 | }; 21 | 22 | }(jQuery)); 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/mock-plugin.rst: -------------------------------------------------------------------------------- 1 | =========== 2 | Mock plugin 3 | =========== 4 | 5 | The mock plugin is useful for testing Guzzle clients. The mock plugin allows you to queue an array of responses that 6 | will satisfy requests sent from a client by consuming the request queue in FIFO order. 7 | 8 | .. code-block:: php 9 | 10 | use Guzzle\Http\Client; 11 | use Guzzle\Plugin\Mock\MockPlugin; 12 | use Guzzle\Http\Message\Response; 13 | 14 | $client = new Client('http://www.test.com/'); 15 | 16 | $mock = new MockPlugin(); 17 | $mock->addResponse(new Response(200)) 18 | ->addResponse(new Response(404)); 19 | 20 | // Add the mock plugin to the client object 21 | $client->addSubscriber($mock); 22 | 23 | // The following request will receive a 200 response from the plugin 24 | $client->get('http://www.example.com/')->send(); 25 | 26 | // The following request will receive a 404 response from the plugin 27 | $client->get('http://www.test.com/')->send(); 28 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/Exception/BatchTransferExceptionTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Batch\BatchTransferInterface'); 13 | $d = $this->getMock('Guzzle\Batch\BatchDivisorInterface'); 14 | $transferException = new BatchTransferException(array('foo'), array(1, 2), $e, $t, $d); 15 | $this->assertEquals(array('foo'), $transferException->getBatch()); 16 | $this->assertSame($t, $transferException->getTransferStrategy()); 17 | $this->assertSame($d, $transferException->getDivisorStrategy()); 18 | $this->assertSame($e, $transferException->getPrevious()); 19 | $this->assertEquals(array(1, 2), $transferException->getTransferredItems()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/js/azure/jquery-plugin.js: -------------------------------------------------------------------------------- 1 | /*globals jQuery*/ 2 | /** 3 | * Simply an alias for the `fineUploader` plug-in wrapper, but hides the required `endpointType` option from the 4 | * integrator. I thought it may be confusing to convey to the integrator that, when using Fine Uploader in Azure mode, 5 | * you need to specify an `endpointType` with a value of "azure", and perhaps an `uploaderType` with a value of "basic" if 6 | * you want to use basic mode when uploading directly to Azure as well. So, you can use this plug-in alias and not worry 7 | * about the `endpointType` option at all. 8 | */ 9 | (function($) { 10 | "use strict"; 11 | 12 | $.fn.fineUploaderAzure = function(optionsOrCommand) { 13 | if (typeof optionsOrCommand === "object") { 14 | 15 | // This option is used to tell the plug-in wrapper to instantiate the appropriate Azure-namespace modules. 16 | optionsOrCommand.endpointType = "azure"; 17 | } 18 | 19 | return $.fn.fineUploader.apply(this, arguments); 20 | }; 21 | 22 | }(jQuery)); 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/IterableCommand.php: -------------------------------------------------------------------------------- 1 | 'iterable_command', 13 | 'parameters' => array( 14 | 'page_size' => array('type' => 'integer'), 15 | 'next_token' => array('type' => 'string') 16 | ) 17 | )); 18 | } 19 | 20 | protected function build() 21 | { 22 | $this->request = $this->client->createRequest('GET'); 23 | 24 | // Add the next token and page size query string values 25 | $this->request->getQuery()->set('next_token', $this->get('next_token')); 26 | 27 | if ($this->get('page_size')) { 28 | $this->request->getQuery()->set('page_size', $this->get('page_size')); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\EventDispatcher\Debug; 13 | 14 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; 15 | 16 | /** 17 | * @author Fabien Potencier 18 | */ 19 | interface TraceableEventDispatcherInterface extends EventDispatcherInterface 20 | { 21 | /** 22 | * Gets the called listeners. 23 | * 24 | * @return array An array of called listeners 25 | */ 26 | public function getCalledListeners(); 27 | 28 | /** 29 | * Gets the not called listeners. 30 | * 31 | * @return array An array of not called listeners 32 | */ 33 | public function getNotCalledListeners(); 34 | } 35 | -------------------------------------------------------------------------------- /docs/modes/ui.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "UI Mode" %} 3 | {% block content %} 4 | {% markdown %} 5 | # Fine Uploader UI Mode {: .page-header } 6 | 7 | [getstarted]: ../quickstart/01-getting-started.html 8 | [dnd]: ../features/drag-and-drop.html 9 | [progress]: ../features/progress-bars.html 10 | [styling]: ../features/styling.html 11 | 12 | Fine Uploader "UI" mode is the easiest way to [get started][getstarted] with a dependency-free 13 | Fine Uploader. This mode provides a [customizable UI][styling], [drag and drop support][dnd], 14 | [progress bars][progress], status messages, a file list with color-coded status indicators, 15 | and other UI niceties. Most developers will decide to use UI mode. 16 | 17 | Fine Uploader UI mode is defined in the `qq.FineUploader` module in the code. 18 | It inherits everything from `qq.FineUploaderBasic`. For more information on the events, 19 | API methods, and configuration options available to UI mode, have a look at the menu at the 20 | top of the page. 21 | 22 | {% endmarkdown %} 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/MethodProxyIteratorTest.php: -------------------------------------------------------------------------------- 1 | append('a'); 18 | $proxy->append('b'); 19 | $this->assertEquals(array('a', 'b'), $i->getArrayCopy()); 20 | $this->assertEquals(array('a', 'b'), $proxy->getArrayCopy()); 21 | } 22 | 23 | public function testUsesInnerIterator() 24 | { 25 | $i = new MethodProxyIterator(new ChunkedIterator(new \ArrayIterator(array(1, 2, 3, 4, 5)), 2)); 26 | $this->assertEquals(3, count(iterator_to_array($i, false))); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ExponentialBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($strategy->makesDecision()); 16 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 17 | $this->assertEquals(1, $strategy->getBackoffPeriod(0, $request)); 18 | $this->assertEquals(2, $strategy->getBackoffPeriod(1, $request)); 19 | $this->assertEquals(4, $strategy->getBackoffPeriod(2, $request)); 20 | $this->assertEquals(8, $strategy->getBackoffPeriod(3, $request)); 21 | $this->assertEquals(16, $strategy->getBackoffPeriod(4, $request)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/HeaderFactoryTest.php: -------------------------------------------------------------------------------- 1 | createHeader('Foo', 'Bar'); 16 | $this->assertInstanceOf('Guzzle\Http\Message\Header', $h); 17 | $this->assertEquals('Foo', $h->getName()); 18 | $this->assertEquals('Bar', (string) $h); 19 | } 20 | 21 | public function testCreatesSpecificHeaders() 22 | { 23 | $f = new HeaderFactory(); 24 | $h = $f->createHeader('Link', '; rel="test"'); 25 | $this->assertInstanceOf('Guzzle\Http\Message\Header\Link', $h); 26 | $this->assertEquals('Link', $h->getName()); 27 | $this->assertEquals('; rel="test"', (string) $h); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/CommaAggregatorTest.php: -------------------------------------------------------------------------------- 1 | aggregate($key, $value, $query); 17 | $this->assertEquals(array('test%20123' => 'foo%20123,baz,bar'), $result); 18 | } 19 | 20 | public function testEncodes() 21 | { 22 | $query = new QueryString(); 23 | $query->useUrlEncoding(false); 24 | $a = new Ag(); 25 | $key = 'test 123'; 26 | $value = array('foo 123', 'baz', 'bar'); 27 | $result = $a->aggregate($key, $value, $query); 28 | $this->assertEquals(array('test 123' => 'foo 123,baz,bar'), $result); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureDivisorTest.php: -------------------------------------------------------------------------------- 1 | createBatches($queue); 34 | $this->assertEquals(array(array('foo'), array('baz')), $batches); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/QueryAggregator/DuplicateAggregatorTest.php: -------------------------------------------------------------------------------- 1 | aggregate($key, $value, $query); 17 | $this->assertEquals(array('facet%201' => array('size%20a', 'width%20b')), $result); 18 | } 19 | 20 | public function testEncodes() 21 | { 22 | $query = new QueryString(); 23 | $query->useUrlEncoding(false); 24 | $a = new Ag(); 25 | $key = 'facet 1'; 26 | $value = array('size a', 'width b'); 27 | $result = $a->aggregate($key, $value, $query); 28 | $this->assertEquals(array('facet 1' => array('size a', 'width b')), $result); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Command/MockCommand.php: -------------------------------------------------------------------------------- 1 | get_called_class() == __CLASS__ ? 'mock_command' : 'sub.sub', 13 | 'httpMethod' => 'POST', 14 | 'parameters' => array( 15 | 'test' => array( 16 | 'default' => 123, 17 | 'required' => true, 18 | 'doc' => 'Test argument' 19 | ), 20 | '_internal' => array( 21 | 'default' => 'abc' 22 | ), 23 | 'foo' => array('filters' => array('strtoupper')) 24 | ) 25 | )); 26 | } 27 | 28 | protected function build() 29 | { 30 | $this->request = $this->client->createRequest(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/grunt/configs/s3.js: -------------------------------------------------------------------------------- 1 | var path = require("path"); 2 | 3 | /* jshint node: true */ 4 | module.exports = function(distPath, buildPath, version) { 5 | "use strict"; 6 | 7 | return { 8 | options: { 9 | sslEnabled: false, 10 | bucket: "releases.fineuploader.com", 11 | access: "public-read", 12 | uploadConcurrency: 10, 13 | params: { 14 | CacheControl: "max-age=630720000, public", 15 | Expires: new Date(Date.now() + 63072000000) 16 | } 17 | }, 18 | clean: { 19 | files: [ 20 | {dest: "develop/" + version, action: "delete"} 21 | ] 22 | }, 23 | develop: { 24 | files: [ 25 | { action: "upload", expand: true, cwd: distPath, src: ["**/*"], dest: "develop/" + version + "/" } 26 | ] 27 | }, 28 | release: { 29 | files: [ 30 | { action: "upload", expand: true, cwd: distPath, src: ["**/*"], dest: version + "/"} 31 | ] 32 | } 33 | 34 | }; 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ./Tests/ 16 | 17 | 18 | 19 | 20 | 21 | ./ 22 | 23 | ./Resources 24 | ./Tests 25 | ./vendor 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/PeclHttpMessageParserTest.php: -------------------------------------------------------------------------------- 1 | markTestSkipped('pecl_http is not available.'); 16 | } 17 | } 18 | 19 | /** 20 | * @dataProvider requestProvider 21 | */ 22 | public function testParsesRequests($message, $parts) 23 | { 24 | $parser = new PeclHttpMessageParser(); 25 | $this->compareRequestResults($parts, $parser->parseRequest($message)); 26 | } 27 | 28 | /** 29 | * @dataProvider responseProvider 30 | */ 31 | public function testParsesResponses($message, $parts) 32 | { 33 | $parser = new PeclHttpMessageParser(); 34 | $this->compareResponseResults($parts, $parser->parseResponse($message)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /client/js/window.receive.message.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | /*jshint -W117 */ 3 | qq.WindowReceiveMessage = function(o) { 4 | "use strict"; 5 | 6 | var options = { 7 | log: function(message, level) {} 8 | }, 9 | callbackWrapperDetachers = {}; 10 | 11 | qq.extend(options, o); 12 | 13 | qq.extend(this, { 14 | receiveMessage: function(id, callback) { 15 | var onMessageCallbackWrapper = function(event) { 16 | callback(event.data); 17 | }; 18 | 19 | if (window.postMessage) { 20 | callbackWrapperDetachers[id] = qq(window).attach("message", onMessageCallbackWrapper); 21 | } 22 | else { 23 | log("iframe message passing not supported in this browser!", "error"); 24 | } 25 | }, 26 | 27 | stopReceivingMessages: function(id) { 28 | if (window.postMessage) { 29 | var detacher = callbackWrapperDetachers[id]; 30 | if (detacher) { 31 | detacher(); 32 | } 33 | } 34 | } 35 | }); 36 | }; 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/backoff-plugin.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | Backoff retry plugin 3 | ==================== 4 | 5 | The ``Guzzle\Plugin\Backoff\BackoffPlugin`` automatically retries failed HTTP requests using custom backoff strategies: 6 | 7 | .. code-block:: php 8 | 9 | use Guzzle\Http\Client; 10 | use Guzzle\Plugin\Backoff\BackoffPlugin; 11 | 12 | $client = new Client('http://www.test.com/'); 13 | // Use a static factory method to get a backoff plugin using the exponential backoff strategy 14 | $backoffPlugin = BackoffPlugin::getExponentialBackoff(); 15 | 16 | // Add the backoff plugin to the client object 17 | $client->addSubscriber($backoffPlugin); 18 | 19 | The BackoffPlugin's constructor accepts a ``Guzzle\Plugin\Backoff\BackoffStrategyInterface`` object that is used to 20 | determine when a retry should be issued and how long to delay between retries. The above code example shows how to 21 | attach a BackoffPlugin to a client that is pre-configured to retry failed 500 and 503 responses using truncated 22 | exponential backoff (emulating the behavior of Guzzle 2's ExponentialBackoffPlugin). 23 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php: -------------------------------------------------------------------------------- 1 | nextToken) { 14 | $this->command->set('next_token', $this->nextToken); 15 | } 16 | 17 | $this->command->set('page_size', (int) $this->calculatePageSize()); 18 | $this->command->execute(); 19 | 20 | $data = json_decode($this->command->getResponse()->getBody(true), true); 21 | 22 | $this->nextToken = $data['next_token']; 23 | 24 | return $data['resources']; 25 | } 26 | 27 | public function next() 28 | { 29 | $this->calledNext++; 30 | parent::next(); 31 | } 32 | 33 | public function getResources() 34 | { 35 | return $this->resources; 36 | } 37 | 38 | public function getIteratedCount() 39 | { 40 | return $this->iteratedCount; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/modes/core.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Core Mode" %} 3 | {% block content %} 4 | {% markdown %} 5 | # Fine Uploader Core Mode {: .page-header } 6 | 7 | [solo-dnd]: ../features/drag-and-drop.html#drag-and-drop-standalone-module 8 | [ui]: ui.html 9 | 10 | If you need to design an exceptionally unique upload experience for you users, _and_ require the 11 | power that Fine Uploader provides in its feature set, core mode is most appropriate. While [UI mode][ui] 12 | provides a customizable default UI, core mode is designed to allow you to develop your own UI that builds on 13 | Fine Uploader's rich API and configuration options. There is _also_ a [standalone drag and drop module][solo-dnd] 14 | available for you to integrate into your custom UI. 15 | 16 | Fine Uploader Core mode is defined in the `qq.FineUploaderBasic` module in the code. 17 | This is the base module for Fine Uploader, and provides all functions that do not 18 | involve UI components. 19 | 20 | For more information on the events, API methods, and configuration options available to UI mode, 21 | have a look at the menu at the top of the page. 22 | 23 | {% endmarkdown %} 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/MockClient.php: -------------------------------------------------------------------------------- 1 | '{scheme}://127.0.0.1:8124/{api_version}/{subdomain}', 30 | 'scheme' => 'http', 31 | 'api_version' => 'v1' 32 | ), array('username', 'password', 'subdomain')); 33 | 34 | return new self($config->get('base_url'), $config); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Michael Dowling, https://github.com/mtdowling 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2015 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | addons: 3 | firefox: "25.0" 4 | 5 | sudo: false 6 | language: node_js 7 | 8 | node_js: 9 | - '0.10.33' 10 | 11 | env: 12 | global: 13 | - LOGS_DIR=/tmp/fineuploader-build/logs 14 | - DISPLAY=:99.0 15 | - secure: |- 16 | AZ/GEWzykeSzxh+4r14eKq2dMQnZyEvx99zFnTSp30Ke9QqJP3UQvMdwHzuV 17 | 7jqjzHQUYMFl8o7VATMm7WeXiSURmzRP2F51W/v0rfhUyTo9BMiCxHmcI3up 18 | wRMBtB4rJxzk3q5sUR32ucVs/fNlOCMC9M02fnSEijGw4Y+WOhc= 19 | - secure: |- 20 | sEQ0OSwK/9SUqLXB+w8n9oEdFEdLxZTBdMhC5fUrsCjgstfUSSgzYOT9cTFp 21 | awR42/q/Akos2eA8NWx5yU+hRC5rr+oQG5Eio0tzi9+y3a6VXDvgS1h2SaQz 22 | TR/MjA/29gFvV7bnp1LSs2TdZx+NGhLd4zHv01XZ+pQk/nQiW9w= 23 | 24 | before_install: 25 | - npm install -g grunt-cli 26 | - git submodule update --init --recursive 27 | 28 | before_script: 29 | - "sh -e /etc/init.d/xvfb start" 30 | 31 | script: 32 | - grunt travis 33 | 34 | branches: 35 | only: 36 | - master 37 | - develop 38 | - /^feature.*$/ 39 | - /^.*fix.*$/ 40 | notifications: 41 | slack: 42 | secure: qb1LdOGlBVKCLxNi86tWrabIKs9TFa3ttpLIwu1vtEeh+R9XDeG32X89sM3a5CHRwLqkHwrs6JNcIC4qhTAKiUOiaPYPbv7PkZXX1GIuOPMBp20ghpnWA7QHv6SpmW4qDCTixZSzf0B0m97muzWm1VnotgRELbfKr9Cf/7h3jS0= 43 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/curl-auth-plugin.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | cURL authentication plugin 3 | ========================== 4 | 5 | .. warning:: 6 | 7 | The CurlAuthPlugin is deprecated. You should use the `auth` parameter of a client to add authorization headers to 8 | every request created by a client. 9 | 10 | .. code-block:: php 11 | 12 | $client->setDefaultOption('auth', array('username', 'password', 'Basic|Digest|NTLM|Any')); 13 | 14 | If your web service client requires basic authorization, then you can use the CurlAuthPlugin to easily add an 15 | Authorization header to each request sent by the client. 16 | 17 | .. code-block:: php 18 | 19 | use Guzzle\Http\Client; 20 | use Guzzle\Plugin\CurlAuth\CurlAuthPlugin; 21 | 22 | $client = new Client('http://www.test.com/'); 23 | 24 | // Add the auth plugin to the client object 25 | $authPlugin = new CurlAuthPlugin('username', 'password'); 26 | $client->addSubscriber($authPlugin); 27 | 28 | $response = $client->get('projects/1/people')->send(); 29 | $xml = new SimpleXMLElement($response->getBody(true)); 30 | foreach ($xml->person as $person) { 31 | echo $person->email . "\n"; 32 | } 33 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/Factory/MapFactoryTest.php: -------------------------------------------------------------------------------- 1 | 'Guzzle\Tests\Service\Mock\Command\MockCommand', 28 | 'test1' => 'Guzzle\Tests\Service\Mock\Command\OtherCommand' 29 | )); 30 | 31 | if (is_null($result)) { 32 | $this->assertNull($factory->factory($key)); 33 | } else { 34 | $this->assertInstanceof($result, $factory->factory($key)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/phing/imports/dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | using git at ${cmd.git} 20 | 21 | 22 | 23 | found git at ${cmd.git} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/cookie-plugin.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Cookie plugin 3 | ============= 4 | 5 | Some web services require a Cookie in order to maintain a session. The ``Guzzle\Plugin\Cookie\CookiePlugin`` will add 6 | cookies to requests and parse cookies from responses using a CookieJar object: 7 | 8 | .. code-block:: php 9 | 10 | use Guzzle\Http\Client; 11 | use Guzzle\Plugin\Cookie\CookiePlugin; 12 | use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar; 13 | 14 | $cookiePlugin = new CookiePlugin(new ArrayCookieJar()); 15 | 16 | // Add the cookie plugin to a client 17 | $client = new Client('http://www.test.com/'); 18 | $client->addSubscriber($cookiePlugin); 19 | 20 | // Send the request with no cookies and parse the returned cookies 21 | $client->get('http://www.yahoo.com/')->send(); 22 | 23 | // Send the request again, noticing that cookies are being sent 24 | $request = $client->get('http://www.yahoo.com/'); 25 | $request->send(); 26 | 27 | echo $request; 28 | 29 | You can disable cookies per-request by setting the ``cookies.disable`` value to true on a request's params object. 30 | 31 | .. code-block:: php 32 | 33 | $request->getParams()->set('cookies.disable', true); 34 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/oauth-plugin.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | OAuth plugin 3 | ============ 4 | 5 | Guzzle ships with an OAuth 1.0 plugin that can sign requests using a consumer key, consumer secret, OAuth token, 6 | and OAuth secret. Here's an example showing how to send an authenticated request to the Twitter REST API: 7 | 8 | .. code-block:: php 9 | 10 | use Guzzle\Http\Client; 11 | use Guzzle\Plugin\Oauth\OauthPlugin; 12 | 13 | $client = new Client('http://api.twitter.com/1'); 14 | $oauth = new OauthPlugin(array( 15 | 'consumer_key' => 'my_key', 16 | 'consumer_secret' => 'my_secret', 17 | 'token' => 'my_token', 18 | 'token_secret' => 'my_token_secret' 19 | )); 20 | $client->addSubscriber($oauth); 21 | 22 | $response = $client->get('statuses/public_timeline.json')->send(); 23 | 24 | If you need to use a custom signing method, you can pass a ``signature_method`` configuration option in the 25 | constructor of the OAuth plugin. The ``signature_method`` option must be a callable variable that accepts a string to 26 | sign and signing key and returns a signed string. 27 | 28 | .. note:: 29 | 30 | You can omit the ``token`` and ``token_secret`` options to use two-legged OAuth. 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/AbstractBatchDecoratorTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Batch\BatchTransferInterface'), 16 | $this->getMock('Guzzle\Batch\BatchDivisorInterface') 17 | ); 18 | 19 | $decoratorA = $this->getMockBuilder('Guzzle\Batch\AbstractBatchDecorator') 20 | ->setConstructorArgs(array($batch)) 21 | ->getMockForAbstractClass(); 22 | 23 | $decoratorB = $this->getMockBuilder('Guzzle\Batch\AbstractBatchDecorator') 24 | ->setConstructorArgs(array($decoratorA)) 25 | ->getMockForAbstractClass(); 26 | 27 | $decoratorA->add('foo'); 28 | $this->assertFalse($decoratorB->isEmpty()); 29 | $this->assertFalse($batch->isEmpty()); 30 | $this->assertEquals(array($decoratorB, $decoratorA), $decoratorB->getDecorators()); 31 | $this->assertEquals(array(), $decoratorB->flush()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/_templates/macros/alerts.html: -------------------------------------------------------------------------------- 1 | {% macro alert(content, type="info", alert_header="Note", close_button=False) -%} 2 | {# type can be success, error (or danger), info. Defaults to a warning style. #} 3 |
    7 | {% if close_button -%} 8 | 9 | {%- endif %} 10 | {% if alert_header -%} 11 |

    {{ alert_header|safe }}

    12 | {%- endif %} 13 | 14 | {{ content|markdown|safe }} 15 | 16 |
    17 | {%- endmacro %} 18 | 19 | {# 20 | {% macro browsers(ok, not_ok) -%} 21 | {% for browser in ok %} 22 | {{ content|safe }} 23 | {% endfor %} 24 | {% for browser in ok %} 25 | {{ content|safe }} 26 | {% endfor %} 27 | {%- endmacro %} 28 | #} 29 | 30 | {% macro label(content, type='warning') -%} 31 | {{ content|safe }} 32 | {%- endmacro %} 33 | 34 | {% macro badge(content, type='warning') -%} 35 | {{ content|safe }} 36 | {%- endmacro %} 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CallbackBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 23 | $strategy = new CallbackBackoffStrategy(function () { return 10; }, true); 24 | $this->assertTrue($strategy->makesDecision()); 25 | $this->assertEquals(10, $strategy->getBackoffPeriod(0, $request)); 26 | // Ensure it chains correctly when null is returned 27 | $strategy = new CallbackBackoffStrategy(function () { return null; }, false); 28 | $this->assertFalse($strategy->makesDecision()); 29 | $this->assertFalse($strategy->getBackoffPeriod(0, $request)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/grunt/configs/version.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var fineUploaderModules = require("../../modules"); 3 | 4 | module.exports = function(pkg) { 5 | "use strict"; 6 | return { 7 | options: { 8 | pkg: pkg, 9 | // jscs:disable validateQuoteMarks 10 | // jshint quotmark:false 11 | prefix: '[^\\-][Vv]ersion[\'"]?\\s*[:=]\\s*[\'"]?' 12 | }, 13 | major: { 14 | options: { 15 | release: "major" 16 | }, 17 | src: fineUploaderModules.modules.versioned 18 | }, 19 | minor: { 20 | options: { 21 | release: "minor" 22 | }, 23 | src: fineUploaderModules.modules.versioned 24 | }, 25 | hotfix: { 26 | options: { 27 | release: "patch" 28 | }, 29 | src: fineUploaderModules.modules.versioned 30 | }, 31 | build: { 32 | options: { 33 | release: "build" 34 | }, 35 | src: fineUploaderModules.modules.versioned 36 | }, 37 | release: { 38 | options: { 39 | release: pkg.version.replace(/-\d+$/, "") 40 | }, 41 | src: fineUploaderModules.modules.versioned 42 | } 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /lib/grunt/tasks/tests.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | var spawn = require("child_process").spawn; 3 | 4 | module.exports = function(grunt) { 5 | "use strict"; 6 | 7 | grunt.registerMultiTask("tests", "** Use ` grunt-test` instead **", function() { 8 | return startKarma.call(this, this.data, this.async()); 9 | }); 10 | 11 | function startKarma(config, done) { 12 | var args, autoWatch, browsers, p, port, reporters, singleRun; 13 | browsers = grunt.option("browsers"); 14 | reporters = grunt.option("reporters"); 15 | port = grunt.option("port"); 16 | autoWatch = grunt.option("autoWatch"); 17 | singleRun = grunt.option("singleRun"); 18 | args = ["node_modules/karma/bin/karma", "start", config, singleRun ? "--single-run" : "", autoWatch ? "--auto-watch" : "", reporters ? "--reporters=" + reporters : "", browsers ? "--browsers=" + browsers : "", port ? "--port=" + port : ""]; 19 | console.log(args); 20 | p = spawn("node", args); 21 | p.stdout.pipe(process.stdout); 22 | p.stderr.pipe(process.stderr); 23 | return p.on("exit", function(code) { 24 | if (code !== 0) { 25 | grunt.fail.warn("Karma test(s) failed. Exit code: " + code); 26 | } 27 | return done(); 28 | }); 29 | } 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/event-dispatcher", 3 | "type": "library", 4 | "description": "Symfony EventDispatcher Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "symfony/dependency-injection": "~2.6", 23 | "symfony/expression-language": "~2.6", 24 | "symfony/config": "~2.0,>=2.0.5", 25 | "symfony/stopwatch": "~2.3", 26 | "psr/log": "~1.0" 27 | }, 28 | "suggest": { 29 | "symfony/dependency-injection": "", 30 | "symfony/http-kernel": "" 31 | }, 32 | "autoload": { 33 | "psr-0": { "Symfony\\Component\\EventDispatcher\\": "" } 34 | }, 35 | "target-dir": "Symfony/Component/EventDispatcher", 36 | "minimum-stability": "dev", 37 | "extra": { 38 | "branch-alias": { 39 | "dev-master": "2.6-dev" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /client/js/ui.handler.focusin.filenameinput.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | // Child of FilenameEditHandler. Used to detect focusin events on file edit input elements. 3 | qq.FilenameInputFocusInHandler = function(s, inheritedInternalApi) { 4 | "use strict"; 5 | 6 | var spec = { 7 | templating: null, 8 | onGetUploadStatus: function(fileId) {}, 9 | log: function(message, lvl) {} 10 | }; 11 | 12 | if (!inheritedInternalApi) { 13 | inheritedInternalApi = {}; 14 | } 15 | 16 | // This will be called by the parent handler when a `focusin` event is received on the list element. 17 | function handleInputFocus(target, event) { 18 | if (spec.templating.isEditInput(target)) { 19 | var fileId = spec.templating.getFileId(target), 20 | status = spec.onGetUploadStatus(fileId); 21 | 22 | if (status === qq.status.SUBMITTED) { 23 | spec.log(qq.format("Detected valid filename input focus event on file '{}', ID: {}.", spec.onGetName(fileId), fileId)); 24 | inheritedInternalApi.handleFilenameEdit(fileId, target); 25 | } 26 | } 27 | } 28 | 29 | spec.eventType = "focusin"; 30 | spec.onHandled = handleInputFocus; 31 | 32 | qq.extend(spec, s); 33 | qq.extend(this, new qq.FilenameEditHandler(spec, inheritedInternalApi)); 34 | }; 35 | -------------------------------------------------------------------------------- /lib/grunt/utils.coffee: -------------------------------------------------------------------------------- 1 | spawn = require('child_process').spawn 2 | path = require 'path' 3 | glob = require 'glob' 4 | grunt = require 'grunt' 5 | _ = grunt.util._ 6 | modules = require '../modules' 7 | 8 | module.exports = 9 | 10 | startKarma: (config, done) -> 11 | browsers = grunt.option 'browsers' 12 | reporters = grunt.option 'reporters' 13 | port = grunt.option 'port' 14 | autoWatch = grunt.option 'autoWatch' 15 | singleRun = grunt.option 'singleRun' 16 | args = ['node_modules/karma/bin/karma', 'start', config, 17 | if singleRun then '--single-run' else '', 18 | if autoWatch then '--auto-watch' else '', 19 | if reporters then '--reporters=' + reporters else '', 20 | if browsers then '--browsers=' + browsers else '', 21 | if port then '--port=' + port else '' 22 | ] 23 | console.log(args) 24 | p = spawn 'node', args 25 | p.stdout.pipe process.stdout 26 | p.stderr.pipe process.stderr 27 | p.on 'exit', (code) -> 28 | if code != 0 29 | grunt.fail.warn "Karma test(s) failed. Exit code: " + code 30 | done() 31 | 32 | concat: (formulae) -> 33 | src = '' 34 | _.map(formulae, (f) -> 35 | files = glob.sync(f) 36 | _.map(files, (file) -> 37 | src = grunt.file.read file 38 | src 39 | ).join(grunt.util.linefeed) 40 | ).join(grunt.util.linefeed) 41 | 42 | -------------------------------------------------------------------------------- /client/js/paste.js: -------------------------------------------------------------------------------- 1 | /*globals qq*/ 2 | qq.PasteSupport = function(o) { 3 | "use strict"; 4 | 5 | var options, detachPasteHandler; 6 | 7 | options = { 8 | targetElement: null, 9 | callbacks: { 10 | log: function(message, level) {}, 11 | pasteReceived: function(blob) {} 12 | } 13 | }; 14 | 15 | function isImage(item) { 16 | return item.type && 17 | item.type.indexOf("image/") === 0; 18 | } 19 | 20 | function registerPasteHandler() { 21 | detachPasteHandler = qq(options.targetElement).attach("paste", function(event) { 22 | var clipboardData = event.clipboardData; 23 | 24 | if (clipboardData) { 25 | qq.each(clipboardData.items, function(idx, item) { 26 | if (isImage(item)) { 27 | var blob = item.getAsFile(); 28 | options.callbacks.pasteReceived(blob); 29 | } 30 | }); 31 | } 32 | }); 33 | } 34 | 35 | function unregisterPasteHandler() { 36 | if (detachPasteHandler) { 37 | detachPasteHandler(); 38 | } 39 | } 40 | 41 | qq.extend(options, o); 42 | registerPasteHandler(); 43 | 44 | qq.extend(this, { 45 | reset: function() { 46 | unregisterPasteHandler(); 47 | } 48 | }); 49 | }; 50 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Curl/CurlVersionTest.php: -------------------------------------------------------------------------------- 1 | getProperty('version'); 20 | $refProperty->setAccessible(true); 21 | $refProperty->setValue($instance, array()); 22 | 23 | $this->assertEquals($info, $instance->getAll()); 24 | $this->assertEquals($info, $instance->getAll()); 25 | 26 | $this->assertEquals($info['version'], $instance->get('version')); 27 | $this->assertFalse($instance->get('foo')); 28 | } 29 | 30 | public function testIsSingleton() 31 | { 32 | $refObject = new \ReflectionClass('Guzzle\Http\Curl\CurlVersion'); 33 | $refProperty = $refObject->getProperty('instance'); 34 | $refProperty->setAccessible(true); 35 | $refProperty->setValue(null, null); 36 | 37 | $this->assertInstanceOf('Guzzle\Http\Curl\CurlVersion', CurlVersion::getInstance()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": [ "test_service2.json" ], 3 | "operations": { 4 | "test": { 5 | "uri": "/path" 6 | }, 7 | "concrete": { 8 | "extends": "abstract" 9 | }, 10 | "foo_bar": { 11 | "uri": "/testing", 12 | "parameters": { 13 | "other": { 14 | "location": "json", 15 | "location_key": "Other" 16 | }, 17 | "test": { 18 | "type": "object", 19 | "location": "json", 20 | "properties": { 21 | "baz": { 22 | "type": "boolean", 23 | "default": true 24 | }, 25 | "bar": { 26 | "type": "string", 27 | "filters": [ 28 | { 29 | "method": "strtolower", 30 | "args": ["test", "@value"] 31 | }, 32 | "strtoupper" 33 | ] 34 | } 35 | } 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/TestData/test_service_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes": [ "test_service2.json" ], 3 | "operations": { 4 | "test": { 5 | "uri": "/path" 6 | }, 7 | "concrete": { 8 | "extends": "abstract" 9 | }, 10 | "baz_qux": { 11 | "uri": "/testing", 12 | "parameters": { 13 | "other": { 14 | "location": "json", 15 | "location_key": "Other" 16 | }, 17 | "test": { 18 | "type": "object", 19 | "location": "json", 20 | "properties": { 21 | "baz": { 22 | "type": "boolean", 23 | "default": true 24 | }, 25 | "bar": { 26 | "type": "string", 27 | "filters": [ 28 | { 29 | "method": "strtolower", 30 | "args": ["test", "@value"] 31 | }, 32 | "strtoupper" 33 | ] 34 | } 35 | } 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/PostFieldVisitorTest.php: -------------------------------------------------------------------------------- 1 | getNestedCommand('postField')->getParam('foo'); 16 | $visitor->visit($this->command, $this->request, $param->setSentAs('test'), '123'); 17 | $this->assertEquals('123', (string) $this->request->getPostField('test')); 18 | } 19 | 20 | public function testRecursivelyBuildsPostFields() 21 | { 22 | $command = $this->getCommand('postField'); 23 | $request = $command->prepare(); 24 | $visitor = new Visitor(); 25 | $param = $command->getOperation()->getParam('foo'); 26 | $visitor->visit($command, $request, $param, $command['foo']); 27 | $visitor->after($command, $request); 28 | $this->assertEquals( 29 | 'Foo[test][baz]=1&Foo[test][Jenga_Yall!]=HELLO&Foo[bar]=123', 30 | rawurldecode((string) $request->getPostFields()) 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/browsers.coffee: -------------------------------------------------------------------------------- 1 | # Browsers, for testing 2 | 3 | browsers = 4 | [ 5 | browserName: "chrome" 6 | platform: "Linux" 7 | version: "28" 8 | , 9 | browserName: "firefox" 10 | platform: "Linux" 11 | version: "26" 12 | , 13 | browserName: "android" 14 | platform: "Linux" 15 | version: "4.0" 16 | , 17 | browserName: "safari" 18 | platform: "OS X 10.8" 19 | version: "6" 20 | , 21 | browserName: "safari" 22 | platform: "OS X 10.6" 23 | version: "5" 24 | , 25 | browserName: "iphone" 26 | platform: "OS X 10.8" 27 | version: "6" 28 | , 29 | # browserName: "iphone" 30 | # platform: "OS X 10.9" 31 | # version: "7" 32 | # , 33 | browserName: "internet explorer" 34 | platform: "Windows 8.1" 35 | version: "11" 36 | , 37 | browserName: "internet explorer" 38 | platform: "Windows 8" 39 | version: "10" 40 | , 41 | browserName: "internet explorer" 42 | platform: "Windows 7" 43 | version: "9" 44 | , 45 | browserName: "internet explorer" 46 | platform: "Windows 7" 47 | version: "8" 48 | , 49 | browserName: "internet explorer" 50 | platform: "Windows XP" 51 | version: "7" 52 | ] 53 | 54 | if (exports) 55 | exports.modules = browsers 56 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/TruncatedBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($strategy->makesDecision()); 19 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 20 | $this->assertFalse($strategy->getBackoffPeriod(0, $request)); 21 | $this->assertFalse($strategy->getBackoffPeriod(1, $request)); 22 | $this->assertFalse($strategy->getBackoffPeriod(2, $request)); 23 | 24 | $response = new Response(500); 25 | $strategy->setNext(new HttpBackoffStrategy(null, new ConstantBackoffStrategy(10))); 26 | $this->assertEquals(10, $strategy->getBackoffPeriod(0, $request, $response)); 27 | $this->assertEquals(10, $strategy->getBackoffPeriod(1, $request, $response)); 28 | $this->assertFalse($strategy->getBackoffPeriod(2, $request, $response)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/FlushingBatchTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Batch\BatchTransferInterface', array('transfer')); 16 | $d = $this->getMock('Guzzle\Batch\BatchDivisorInterface', array('createBatches')); 17 | 18 | $batch = new Batch($t, $d); 19 | $queue = $this->readAttribute($batch, 'queue'); 20 | 21 | $d->expects($this->exactly(2)) 22 | ->method('createBatches') 23 | ->will($this->returnCallback(function () use ($queue) { 24 | $items = array(); 25 | foreach ($queue as $item) { 26 | $items[] = $item; 27 | } 28 | return array($items); 29 | })); 30 | 31 | $t->expects($this->exactly(2)) 32 | ->method('transfer'); 33 | 34 | $flush = new FlushingBatch($batch, 3); 35 | $this->assertEquals(3, $flush->getThreshold()); 36 | $flush->setThreshold(2); 37 | $flush->add('foo')->add('baz')->add('bar')->add('bee')->add('boo'); 38 | $this->assertEquals(1, count($flush)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/plugins/md5-validator-plugin.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | MD5 validator plugin 3 | ==================== 4 | 5 | Entity bodies can sometimes be modified over the wire due to a faulty TCP transport or misbehaving proxy. If an HTTP 6 | response contains a Content-MD5 header, then a MD5 hash of the entity body of a response can be compared against the 7 | Content-MD5 header of the response to determine if the response was delivered intact. The 8 | ``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` will throw an ``UnexpectedValueException`` if the calculated MD5 hash does 9 | not match the Content-MD5 header value: 10 | 11 | .. code-block:: php 12 | 13 | use Guzzle\Http\Client; 14 | use Guzzle\Plugin\Md5\Md5ValidatorPlugin; 15 | 16 | $client = new Client('http://www.test.com/'); 17 | 18 | $md5Plugin = new Md5ValidatorPlugin(); 19 | 20 | // Add the md5 plugin to the client object 21 | $client->addSubscriber($md5Plugin); 22 | 23 | $request = $client->get('http://www.yahoo.com/'); 24 | $request->send(); 25 | 26 | Calculating the MD5 hash of a large entity body or an entity body that was transferred using a Content-Encoding is an 27 | expensive operation. When working in high performance applications, you might consider skipping the MD5 hash 28 | validation for entity bodies bigger than a certain size or Content-Encoded entity bodies 29 | (see ``Guzzle\Plugin\Md5\Md5ValidatorPlugin`` for more information). 30 | -------------------------------------------------------------------------------- /client/js/azure/rest/delete-blob.js: -------------------------------------------------------------------------------- 1 | /* globals qq */ 2 | /** 3 | * Implements the Delete Blob Azure REST API call. http://msdn.microsoft.com/en-us/library/windowsazure/dd179413.aspx. 4 | */ 5 | qq.azure.DeleteBlob = function(o) { 6 | "use strict"; 7 | 8 | var requester, 9 | method = "DELETE", 10 | options = { 11 | endpointStore: {}, 12 | onDelete: function(id) {}, 13 | onDeleteComplete: function(id, xhr, isError) {}, 14 | log: function(str, level) {} 15 | }; 16 | 17 | qq.extend(options, o); 18 | 19 | requester = qq.extend(this, new qq.AjaxRequester({ 20 | validMethods: [method], 21 | method: method, 22 | successfulResponseCodes: (function() { 23 | var codes = {}; 24 | codes[method] = [202]; 25 | return codes; 26 | }()), 27 | contentType: null, 28 | endpointStore: options.endpointStore, 29 | allowXRequestedWithAndCacheControl: false, 30 | cors: { 31 | expected: true 32 | }, 33 | log: options.log, 34 | onSend: options.onDelete, 35 | onComplete: options.onDeleteComplete 36 | })); 37 | 38 | qq.extend(this, { 39 | method: method, 40 | send: function(id) { 41 | options.log("Submitting Delete Blob request for " + id); 42 | 43 | return requester.initTransport(id) 44 | .send(); 45 | } 46 | }); 47 | }; 48 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/ReasonPhraseBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertEmpty(ReasonPhraseBackoffStrategy::getDefaultFailureCodes()); 17 | $strategy = new ReasonPhraseBackoffStrategy(array('Foo', 'Internal Server Error')); 18 | $this->assertTrue($strategy->makesDecision()); 19 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 20 | $response = new Response(200); 21 | $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, $response)); 22 | $response->setStatus(200, 'Foo'); 23 | $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, $response)); 24 | } 25 | 26 | public function testIgnoresNonErrors() 27 | { 28 | $strategy = new ReasonPhraseBackoffStrategy(); 29 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 30 | $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Fine Uploader](http://fineuploader.com/img/FineUploader_logo.png)](http://fineuploader.com/) 2 | 3 | Version: 5.2.2 4 | 5 | [![Build Status](https://travis-ci.org/FineUploader/fine-uploader.png?branch=master)](https://travis-ci.org/FineUploader/fine-uploader) | [![Semver badge](http://calm-shore-6115.herokuapp.com/?label=SemVer&value=2.0.0&color=green)](http://semver.org/spec/v2.0.0.html) 6 | 7 | [**Download**](http://fineuploader.com/downloads.html) | 8 | [**Documentation**](http://docs.fineuploader.com) | 9 | [**Examples**](http://fineuploader.com/demos) | 10 | [**Support**](http://fineuploader.com/support.html) | 11 | [**Blog**](http://blog.fineuploader.com/) | 12 | [**Changelog**](http://blog.fineuploader.com/category/changelog/) 13 | 14 | --- 15 | 16 | Fine Uploader aims to make file-uploading on the web possible in every browser and mobile device. It is **cross-browser**, **dependency-free**, and **100% Javascript**. 17 | 18 | FineUploader is simple to use. You only need to include one JavaScript file. There are absolutely no other dependencies. 19 | For more information, please see the [**documentation**](http://docs.fineuploader.com). 20 | 21 | ### License ### 22 | This plugin is made available under the [Widen Commercial license](LICENSE). If you are using Fine Uploader for commercial purposes, 23 | you must [purchase a license](http://fineuploader.com/purchase). 24 | 25 | 26 | *Fine Uploader is a code library maintained and developed by [Widen Enterprises, Inc.](http://www.widen.com/)* 27 | -------------------------------------------------------------------------------- /lib/grunt/configs/uglify.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | module.exports = function(paths) { 3 | "use strict"; 4 | return { 5 | options: { 6 | mangle: true, 7 | compress: { 8 | warnings: false 9 | }, 10 | report: "min", 11 | preserveComments: "some" 12 | }, 13 | core: { 14 | src: ["<%= concat.core.dest %>"], 15 | dest: "" + paths.build + "/<%= pkg.name %>.min.js" 16 | }, 17 | jquery: { 18 | src: ["<%= concat.jquery.dest %>"], 19 | dest: "" + paths.build + "/jquery.<%= pkg.name %>.min.js" 20 | }, 21 | coreAzure: { 22 | src: ["<%= concat.coreAzure.dest %>"], 23 | dest: "" + paths.build + "/azure.<%= pkg.name %>.min.js" 24 | }, 25 | jqueryAzure: { 26 | src: ["<%= concat.jqueryAzure.dest %>"], 27 | dest: "" + paths.build + "/azure.jquery.<%= pkg.name %>.min.js" 28 | }, 29 | coreS3: { 30 | src: ["<%= concat.coreS3.dest %>"], 31 | dest: "" + paths.build + "/s3.<%= pkg.name %>.min.js" 32 | }, 33 | jqueryS3: { 34 | src: ["<%= concat.jqueryS3.dest %>"], 35 | dest: "" + paths.build + "/s3.jquery.<%= pkg.name %>.min.js" 36 | }, 37 | all: { 38 | src: ["<%= concat.all.dest %>"], 39 | dest: "" + paths.build + "/all.<%= pkg.name %>.min.js" 40 | } 41 | }; 42 | }; 43 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/getting-started/faq.rst: -------------------------------------------------------------------------------- 1 | === 2 | FAQ 3 | === 4 | 5 | What should I do if I get this error: Fatal error: Maximum function nesting level of '100' reached, aborting! 6 | ------------------------------------------------------------------------------------------------------------- 7 | 8 | You could run into this error if you have the XDebug extension installed and you execute a lot of requests in 9 | callbacks. This error message comes specifically from the XDebug extension. PHP itself does not have a function 10 | nesting limit. Change this setting in your php.ini to increase the limit:: 11 | 12 | xdebug.max_nesting_level = 1000 13 | 14 | [`source `_] 15 | 16 | How can I speed up my client? 17 | ----------------------------- 18 | 19 | There are several things you can do to speed up your client: 20 | 21 | 1. Utilize a C based HTTP message parser (e.g. ``Guzzle\Parser\Message\PeclHttpMessageParser``) 22 | 2. Disable operation validation by setting the ``command.disable_validation`` option to true on a command 23 | 24 | Why am I getting a 417 error response? 25 | -------------------------------------- 26 | 27 | This can occur for a number of reasons, but if you are sending PUT, POST, or PATCH requests with an 28 | ``Expect: 100-Continue`` header, a server that does not support this header will return a 417 response. You can work 29 | around this by calling ``$request->removeHeader('Expect');`` after setting the entity body of a request. 30 | -------------------------------------------------------------------------------- /client/js/azure/uploader.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | /** 3 | * This defines FineUploader mode w/ support for uploading to Azure, which provides all the basic 4 | * functionality of Fine Uploader as well as code to handle uploads directly to Azure. 5 | * This module inherits all logic from UI & core mode and adds some UI-related logic 6 | * specific to the upload-to-Azure workflow. Some inherited options and API methods have a special meaning 7 | * in the context of the Azure uploader. 8 | */ 9 | (function() { 10 | "use strict"; 11 | 12 | qq.azure.FineUploader = function(o) { 13 | var options = { 14 | failedUploadTextDisplay: { 15 | mode: "custom" 16 | } 17 | }; 18 | 19 | // Replace any default options with user defined ones 20 | qq.extend(options, o, true); 21 | 22 | // Inherit instance data from FineUploader, which should in turn inherit from azure.FineUploaderBasic. 23 | qq.FineUploader.call(this, options, "azure"); 24 | }; 25 | 26 | // Inherit the API methods from FineUploaderBasicS3 27 | qq.extend(qq.azure.FineUploader.prototype, qq.azure.FineUploaderBasic.prototype); 28 | 29 | // Inherit public and private API methods related to UI 30 | qq.extend(qq.azure.FineUploader.prototype, qq.uiPublicApi); 31 | qq.extend(qq.azure.FineUploader.prototype, qq.uiPrivateApi); 32 | 33 | // Define public & private API methods for this module. 34 | qq.extend(qq.azure.FineUploader.prototype, { 35 | }); 36 | }()); 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/NotifyingBatchTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Batch\Batch', array('flush'), array( 16 | $this->getMock('Guzzle\Batch\BatchTransferInterface'), 17 | $this->getMock('Guzzle\Batch\BatchDivisorInterface') 18 | )); 19 | 20 | $batch->expects($this->once()) 21 | ->method('flush') 22 | ->will($this->returnValue(array('foo', 'baz'))); 23 | 24 | $data = array(); 25 | $decorator = new NotifyingBatch($batch, function ($batch) use (&$data) { 26 | $data[] = $batch; 27 | }); 28 | 29 | $decorator->add('foo')->add('baz'); 30 | $decorator->flush(); 31 | $this->assertEquals(array(array('foo', 'baz')), $data); 32 | } 33 | 34 | /** 35 | * @expectedException Guzzle\Common\Exception\InvalidArgumentException 36 | */ 37 | public function testEnsuresCallableIsValid() 38 | { 39 | $batch = new Batch( 40 | $this->getMock('Guzzle\Batch\BatchTransferInterface'), 41 | $this->getMock('Guzzle\Batch\BatchDivisorInterface') 42 | ); 43 | $decorator = new NotifyingBatch($batch, 'foo'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cache/DefaultCanCacheStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertTrue($strategy->canCacheRequest($request)); 19 | } 20 | 21 | public function testDoesNotCacheNoStore() 22 | { 23 | $strategy = new DefaultCanCacheStrategy(); 24 | $request = new Request('GET', 'http://foo.com', array('cache-control' => 'no-store')); 25 | $this->assertFalse($strategy->canCacheRequest($request)); 26 | } 27 | 28 | public function testCanCacheResponse() 29 | { 30 | $response = $this->getMockBuilder('Guzzle\Http\Message\Response') 31 | ->setMethods(array('canCache')) 32 | ->setConstructorArgs(array(200)) 33 | ->getMock(); 34 | $response->expects($this->once()) 35 | ->method('canCache') 36 | ->will($this->returnValue(true)); 37 | $strategy = new DefaultCanCacheStrategy(); 38 | $this->assertTrue($strategy->canCacheResponse($response)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/CompositeResourceIteratorFactoryTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($factory->canBuild($cmd)); 25 | $factory->build($cmd); 26 | } 27 | 28 | public function testBuildsResourceIterators() 29 | { 30 | $f1 = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); 31 | $factory = new CompositeResourceIteratorFactory(array()); 32 | $factory->addFactory($f1); 33 | $command = new MockCommand(); 34 | $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock')); 35 | $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/Zf2LogAdapterTest.php: -------------------------------------------------------------------------------- 1 | stream = fopen('php://temp', 'r+'); 26 | $this->log = new Logger(); 27 | $this->log->addWriter(new Stream($this->stream)); 28 | $this->adapter = new Zf2LogAdapter($this->log); 29 | 30 | } 31 | 32 | public function testLogsMessagesToAdaptedObject() 33 | { 34 | // Test without a priority 35 | $this->adapter->log('Zend_Test!', \LOG_NOTICE); 36 | rewind($this->stream); 37 | $contents = stream_get_contents($this->stream); 38 | $this->assertEquals(1, substr_count($contents, 'Zend_Test!')); 39 | 40 | // Test with a priority 41 | $this->adapter->log('Zend_Test!', \LOG_ALERT); 42 | rewind($this->stream); 43 | $contents = stream_get_contents($this->stream); 44 | $this->assertEquals(2, substr_count($contents, 'Zend_Test!')); 45 | } 46 | 47 | public function testExposesAdaptedLogObject() 48 | { 49 | $this->assertEquals($this->log, $this->adapter->getLogObject()); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/ExceptionBufferingBatchTest.php: -------------------------------------------------------------------------------- 1 | getMockBuilder('Guzzle\Batch\BatchTransferInterface') 17 | ->setMethods(array('transfer')) 18 | ->getMock(); 19 | 20 | $d = new BatchSizeDivisor(1); 21 | $batch = new Batch($t, $d); 22 | 23 | $called = 0; 24 | $t->expects($this->exactly(3)) 25 | ->method('transfer') 26 | ->will($this->returnCallback(function ($batch) use (&$called) { 27 | if (++$called === 2) { 28 | throw new \Exception('Foo'); 29 | } 30 | })); 31 | 32 | $decorator = new ExceptionBufferingBatch($batch); 33 | $decorator->add('foo')->add('baz')->add('bar'); 34 | $result = $decorator->flush(); 35 | 36 | $e = $decorator->getExceptions(); 37 | $this->assertEquals(1, count($e)); 38 | $this->assertEquals(array('baz'), $e[0]->getBatch()); 39 | 40 | $decorator->clearExceptions(); 41 | $this->assertEquals(0, count($decorator->getExceptions())); 42 | 43 | $this->assertEquals(array('foo', 'bar'), $result); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Backoff/CurlBackoffStrategyTest.php: -------------------------------------------------------------------------------- 1 | assertNotEmpty(CurlBackoffStrategy::getDefaultFailureCodes()); 18 | $strategy = new CurlBackoffStrategy(); 19 | $this->assertTrue($strategy->makesDecision()); 20 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 21 | $e = new CurlException(); 22 | $e->setError('foo', CURLE_BAD_CALLING_ORDER); 23 | $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, null, $e)); 24 | 25 | foreach (CurlBackoffStrategy::getDefaultFailureCodes() as $code) { 26 | $this->assertEquals(0, $strategy->getBackoffPeriod(0, $request, null, $e->setError('foo', $code))); 27 | } 28 | } 29 | 30 | public function testIgnoresNonErrors() 31 | { 32 | $strategy = new CurlBackoffStrategy(); 33 | $request = $this->getMock('Guzzle\Http\Message\Request', array(), array(), '', false); 34 | $this->assertEquals(false, $strategy->getBackoffPeriod(0, $request, new Response(200))); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/MapResourceIteratorFactoryTest.php: -------------------------------------------------------------------------------- 1 | build(new MockCommand()); 21 | } 22 | 23 | public function testBuildsResourceIterators() 24 | { 25 | $factory = new MapResourceIteratorFactory(array( 26 | 'mock_command' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator' 27 | )); 28 | $iterator = $factory->build(new MockCommand()); 29 | $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); 30 | } 31 | 32 | public function testUsesWildcardMappings() 33 | { 34 | $factory = new MapResourceIteratorFactory(array( 35 | '*' => 'Guzzle\Tests\Service\Mock\Model\MockCommandIterator' 36 | )); 37 | $iterator = $factory->build(new MockCommand()); 38 | $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | $path) { 28 | $loader->set($namespace, $path); 29 | } 30 | 31 | $map = require __DIR__ . '/autoload_psr4.php'; 32 | foreach ($map as $namespace => $path) { 33 | $loader->setPsr4($namespace, $path); 34 | } 35 | 36 | $classMap = require __DIR__ . '/autoload_classmap.php'; 37 | if ($classMap) { 38 | $loader->addClassMap($classMap); 39 | } 40 | 41 | $loader->register(true); 42 | 43 | return $loader; 44 | } 45 | } 46 | 47 | function composerRequireb4203a00164cef7064dbb242ca2022df($file) 48 | { 49 | require $file; 50 | } 51 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/IoEmittingEntityBodyTest.php: -------------------------------------------------------------------------------- 1 | decorated = EntityBody::factory('hello'); 19 | $this->body = new IoEmittingEntityBody($this->decorated); 20 | } 21 | 22 | public function testEmitsReadEvents() 23 | { 24 | $e = null; 25 | $this->body->getEventDispatcher()->addListener('body.read', function ($event) use (&$e) { 26 | $e = $event; 27 | }); 28 | $this->assertEquals('hel', $this->body->read(3)); 29 | $this->assertEquals('hel', $e['read']); 30 | $this->assertEquals(3, $e['length']); 31 | $this->assertSame($this->body, $e['body']); 32 | } 33 | 34 | public function testEmitsWriteEvents() 35 | { 36 | $e = null; 37 | $this->body->getEventDispatcher()->addListener('body.write', function ($event) use (&$e) { 38 | $e = $event; 39 | }); 40 | $this->body->seek(0, SEEK_END); 41 | $this->assertEquals(5, $this->body->write('there')); 42 | $this->assertEquals('there', $e['write']); 43 | $this->assertEquals(5, $e['result']); 44 | $this->assertSame($this->body, $e['body']); 45 | $this->assertEquals('hellothere', (string) $this->body); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/CurlAuth/CurlAuthPluginTest.php: -------------------------------------------------------------------------------- 1 | getEventDispatcher()->addSubscriber($plugin); 20 | $request = $client->get('/'); 21 | $this->assertEquals('michael', $request->getUsername()); 22 | $this->assertEquals('test', $request->getPassword()); 23 | Version::$emitWarnings = true; 24 | } 25 | 26 | public function testAddsDigestAuthentication() 27 | { 28 | Version::$emitWarnings = false; 29 | $plugin = new CurlAuthPlugin('julian', 'test', CURLAUTH_DIGEST); 30 | $client = new Client('http://www.test.com/'); 31 | $client->getEventDispatcher()->addSubscriber($plugin); 32 | $request = $client->get('/'); 33 | $this->assertEquals('julian', $request->getUsername()); 34 | $this->assertEquals('test', $request->getPassword()); 35 | $this->assertEquals('julian:test', $request->getCurlOptions()->get(CURLOPT_USERPWD)); 36 | $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH)); 37 | Version::$emitWarnings = true; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/js/ui.handler.click.filename.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | // Child of FilenameEditHandler. Used to detect click events on filename display elements. 3 | qq.FilenameClickHandler = function(s) { 4 | "use strict"; 5 | 6 | var inheritedInternalApi = {}, 7 | spec = { 8 | templating: null, 9 | log: function(message, lvl) {}, 10 | classes: { 11 | file: "qq-upload-file", 12 | editNameIcon: "qq-edit-filename-icon" 13 | }, 14 | onGetUploadStatus: function(fileId) {}, 15 | onGetName: function(fileId) {} 16 | }; 17 | 18 | qq.extend(spec, s); 19 | 20 | // This will be called by the parent handler when a `click` event is received on the list element. 21 | function examineEvent(target, event) { 22 | if (spec.templating.isFileName(target) || spec.templating.isEditIcon(target)) { 23 | var fileId = spec.templating.getFileId(target), 24 | status = spec.onGetUploadStatus(fileId); 25 | 26 | // We only allow users to change filenames of files that have been submitted but not yet uploaded. 27 | if (status === qq.status.SUBMITTED) { 28 | spec.log(qq.format("Detected valid filename click event on file '{}', ID: {}.", spec.onGetName(fileId), fileId)); 29 | qq.preventDefault(event); 30 | 31 | inheritedInternalApi.handleFilenameEdit(fileId, target, true); 32 | } 33 | } 34 | } 35 | 36 | spec.eventType = "click"; 37 | spec.onHandled = examineEvent; 38 | 39 | qq.extend(this, new qq.FilenameEditHandler(spec, inheritedInternalApi)); 40 | }; 41 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/docs/docs.rst: -------------------------------------------------------------------------------- 1 | .. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services 2 | 3 | ==================== 4 | Guzzle Documentation 5 | ==================== 6 | 7 | Getting started 8 | --------------- 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | getting-started/overview 14 | getting-started/installation 15 | getting-started/faq 16 | 17 | The HTTP client 18 | --------------- 19 | 20 | .. toctree:: 21 | :maxdepth: 2 22 | 23 | http-client/client 24 | http-client/request 25 | http-client/response 26 | http-client/entity-bodies 27 | http-client/http-redirects 28 | http-client/uri-templates 29 | 30 | Plugins 31 | ------- 32 | 33 | .. toctree:: 34 | :maxdepth: 1 35 | 36 | plugins/plugins-overview 37 | plugins/creating-plugins 38 | plugins/async-plugin 39 | plugins/backoff-plugin 40 | plugins/cache-plugin 41 | plugins/cookie-plugin 42 | plugins/curl-auth-plugin 43 | plugins/history-plugin 44 | plugins/log-plugin 45 | plugins/md5-validator-plugin 46 | plugins/mock-plugin 47 | plugins/oauth-plugin 48 | 49 | The web service client 50 | ---------------------- 51 | 52 | .. toctree:: 53 | :maxdepth: 1 54 | 55 | webservice-client/webservice-client 56 | webservice-client/using-the-service-builder 57 | webservice-client/guzzle-service-descriptions 58 | batching/batching 59 | iterators/resource-iterators 60 | iterators/guzzle-iterators 61 | 62 | Testing 63 | ------- 64 | 65 | .. toctree:: 66 | :maxdepth: 2 67 | 68 | testing/unit-testing 69 | 70 | API Docs 71 | -------- 72 | 73 | `Read the API docs `_ 74 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/MockObserver.php: -------------------------------------------------------------------------------- 1 | events as $event) { 20 | if ($event->getName() == $eventName) { 21 | return true; 22 | } 23 | } 24 | 25 | return false; 26 | } 27 | 28 | public function getLastEvent() 29 | { 30 | return end($this->events); 31 | } 32 | 33 | public function count() 34 | { 35 | return count($this->events); 36 | } 37 | 38 | public function getGrouped() 39 | { 40 | $events = array(); 41 | foreach ($this->events as $event) { 42 | if (!isset($events[$event->getName()])) { 43 | $events[$event->getName()] = array(); 44 | } 45 | $events[$event->getName()][] = $event; 46 | } 47 | 48 | return $events; 49 | } 50 | 51 | public function getData($event, $key, $occurrence = 0) 52 | { 53 | $grouped = $this->getGrouped(); 54 | if (isset($grouped[$event])) { 55 | return $grouped[$event][$occurrence][$key]; 56 | } 57 | 58 | return null; 59 | } 60 | 61 | public function update(Event $event) 62 | { 63 | $this->events[] = $event; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/AbstractEntityBodyDecoratorTest.php: -------------------------------------------------------------------------------- 1 | getMockForAbstractClass('Guzzle\Http\AbstractEntityBodyDecorator', array($e)); 16 | 17 | $this->assertSame($e->getStream(), $mock->getStream()); 18 | $this->assertSame($e->getContentLength(), $mock->getContentLength()); 19 | $this->assertSame($e->getSize(), $mock->getSize()); 20 | $this->assertSame($e->getContentMd5(), $mock->getContentMd5()); 21 | $this->assertSame($e->getContentType(), $mock->getContentType()); 22 | $this->assertSame($e->__toString(), $mock->__toString()); 23 | $this->assertSame($e->getUri(), $mock->getUri()); 24 | $this->assertSame($e->getStreamType(), $mock->getStreamType()); 25 | $this->assertSame($e->getWrapper(), $mock->getWrapper()); 26 | $this->assertSame($e->getWrapperData(), $mock->getWrapperData()); 27 | $this->assertSame($e->isReadable(), $mock->isReadable()); 28 | $this->assertSame($e->isWritable(), $mock->isWritable()); 29 | $this->assertSame($e->isConsumed(), $mock->isConsumed()); 30 | $this->assertSame($e->isLocal(), $mock->isLocal()); 31 | $this->assertSame($e->isSeekable(), $mock->isSeekable()); 32 | $this->assertSame($e->getContentEncoding(), $mock->getContentEncoding()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchClosureTransferTest.php: -------------------------------------------------------------------------------- 1 | itemsTransferred = null; 21 | $itemsTransferred =& $this->itemsTransferred; 22 | 23 | $this->transferStrategy = new BatchClosureTransfer(function (array $batch) use (&$itemsTransferred) { 24 | $itemsTransferred = $batch; 25 | return; 26 | }); 27 | } 28 | 29 | public function testTransfersBatch() 30 | { 31 | $batchedItems = array('foo', 'bar', 'baz'); 32 | $this->transferStrategy->transfer($batchedItems); 33 | 34 | $this->assertEquals($batchedItems, $this->itemsTransferred); 35 | } 36 | 37 | public function testTransferBailsOnEmptyBatch() 38 | { 39 | $batchedItems = array(); 40 | $this->transferStrategy->transfer($batchedItems); 41 | 42 | $this->assertNull($this->itemsTransferred); 43 | } 44 | 45 | /** 46 | * @expectedException Guzzle\Common\Exception\InvalidArgumentException 47 | */ 48 | public function testEnsuresCallableIsCallable() 49 | { 50 | $foo = new BatchClosureTransfer('uh oh!'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /client/js/s3/uploader.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | /** 3 | * This defines FineUploader mode w/ support for uploading to S3, which provides all the basic 4 | * functionality of Fine Uploader as well as code to handle uploads directly to S3. 5 | * This module inherits all logic from FineUploader mode and FineUploaderBasicS3 mode and adds some UI-related logic 6 | * specific to the upload-to-S3 workflow. Some inherited options and API methods have a special meaning 7 | * in the context of the S3 uploader. 8 | */ 9 | (function() { 10 | "use strict"; 11 | 12 | qq.s3.FineUploader = function(o) { 13 | var options = { 14 | failedUploadTextDisplay: { 15 | mode: "custom" 16 | } 17 | }; 18 | 19 | // Replace any default options with user defined ones 20 | qq.extend(options, o, true); 21 | 22 | // Inherit instance data from FineUploader, which should in turn inherit from s3.FineUploaderBasic. 23 | qq.FineUploader.call(this, options, "s3"); 24 | 25 | if (!qq.supportedFeatures.ajaxUploading && options.iframeSupport.localBlankPagePath === undefined) { 26 | this._options.element.innerHTML = "
    You MUST set the localBlankPagePath property " + 27 | "of the iframeSupport option since this browser does not support the File API!
    "; 28 | } 29 | }; 30 | 31 | // Inherit the API methods from FineUploaderBasicS3 32 | qq.extend(qq.s3.FineUploader.prototype, qq.s3.FineUploaderBasic.prototype); 33 | 34 | // Inherit public and private API methods related to UI 35 | qq.extend(qq.s3.FineUploader.prototype, qq.uiPublicApi); 36 | qq.extend(qq.s3.FineUploader.prototype, qq.uiPrivateApi); 37 | }()); 38 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/InflectorTest.php: -------------------------------------------------------------------------------- 1 | assertSame(Inflector::getDefault(), Inflector::getDefault()); 15 | } 16 | 17 | public function testSnake() 18 | { 19 | $this->assertEquals('camel_case', Inflector::getDefault()->snake('camelCase')); 20 | $this->assertEquals('camel_case', Inflector::getDefault()->snake('CamelCase')); 21 | $this->assertEquals('camel_case_words', Inflector::getDefault()->snake('CamelCaseWords')); 22 | $this->assertEquals('camel_case_words', Inflector::getDefault()->snake('CamelCase_words')); 23 | $this->assertEquals('test', Inflector::getDefault()->snake('test')); 24 | $this->assertEquals('test', Inflector::getDefault()->snake('test')); 25 | $this->assertEquals('expect100_continue', Inflector::getDefault()->snake('Expect100Continue')); 26 | } 27 | 28 | public function testCamel() 29 | { 30 | $this->assertEquals('CamelCase', Inflector::getDefault()->camel('camel_case')); 31 | $this->assertEquals('CamelCaseWords', Inflector::getDefault()->camel('camel_case_words')); 32 | $this->assertEquals('Test', Inflector::getDefault()->camel('test')); 33 | $this->assertEquals('Expect100Continue', ucfirst(Inflector::getDefault()->camel('expect100_continue'))); 34 | // Get from cache 35 | $this->assertEquals('Test', Inflector::getDefault()->camel('test', false)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /client/js/ui.handler.events.js: -------------------------------------------------------------------------------- 1 | /*globals qq */ 2 | // Base handler for UI (FineUploader mode) events. 3 | // Some more specific handlers inherit from this one. 4 | qq.UiEventHandler = function(s, protectedApi) { 5 | "use strict"; 6 | 7 | var disposer = new qq.DisposeSupport(), 8 | spec = { 9 | eventType: "click", 10 | attachTo: null, 11 | onHandled: function(target, event) {} 12 | }; 13 | 14 | // This makes up the "public" API methods that will be accessible 15 | // to instances constructing a base or child handler 16 | qq.extend(this, { 17 | addHandler: function(element) { 18 | addHandler(element); 19 | }, 20 | 21 | dispose: function() { 22 | disposer.dispose(); 23 | } 24 | }); 25 | 26 | function addHandler(element) { 27 | disposer.attach(element, spec.eventType, function(event) { 28 | // Only in IE: the `event` is a property of the `window`. 29 | event = event || window.event; 30 | 31 | // On older browsers, we must check the `srcElement` instead of the `target`. 32 | var target = event.target || event.srcElement; 33 | 34 | spec.onHandled(target, event); 35 | }); 36 | } 37 | 38 | // These make up the "protected" API methods that children of this base handler will utilize. 39 | qq.extend(protectedApi, { 40 | getFileIdFromItem: function(item) { 41 | return item.qqFileId; 42 | }, 43 | 44 | getDisposeSupport: function() { 45 | return disposer; 46 | } 47 | }); 48 | 49 | qq.extend(spec, s); 50 | 51 | if (spec.attachTo) { 52 | addHandler(spec.attachTo); 53 | } 54 | }; 55 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/CachingConfigLoaderTest.php: -------------------------------------------------------------------------------- 1 | getMockBuilder('Guzzle\Service\ConfigLoaderInterface') 18 | ->setMethods(array('load')) 19 | ->getMockForAbstractClass(); 20 | $data = array('foo' => 'bar'); 21 | $loader->expects($this->once()) 22 | ->method('load') 23 | ->will($this->returnValue($data)); 24 | $cache = new CachingConfigLoader($loader, $cache); 25 | $this->assertEquals($data, $cache->load('foo')); 26 | $this->assertEquals($data, $cache->load('foo')); 27 | } 28 | 29 | public function testDoesNotCacheArrays() 30 | { 31 | $cache = new DoctrineCacheAdapter(new ArrayCache()); 32 | $loader = $this->getMockBuilder('Guzzle\Service\ConfigLoaderInterface') 33 | ->setMethods(array('load')) 34 | ->getMockForAbstractClass(); 35 | $data = array('foo' => 'bar'); 36 | $loader->expects($this->exactly(2)) 37 | ->method('load') 38 | ->will($this->returnValue($data)); 39 | $cache = new CachingConfigLoader($loader, $cache); 40 | $this->assertEquals($data, $cache->load(array())); 41 | $this->assertEquals($data, $cache->load(array())); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /test/static/local/formdata.js: -------------------------------------------------------------------------------- 1 | /* globals assert, qq */ 2 | function mockFormData() { 3 | "use strict"; 4 | 5 | function FormData() { 6 | this.fake = true; 7 | this.boundary = "--------FormData" + Math.random(); 8 | this.fields = {}; 9 | } 10 | 11 | FormData.prototype.append = function(key, value) { 12 | if (this.fields[key] === undefined) { 13 | this.fields[key] = value; 14 | } 15 | else { 16 | assert.ok(false, "Duplicate field name appended!"); 17 | } 18 | }; 19 | 20 | FormData.prototype.toString = function() { 21 | var boundary = this.boundary; 22 | var body = ""; 23 | qq.each(this.fields, function(field, value) { 24 | body += "--" + boundary + "\r\n"; 25 | // file upload 26 | if (value.name) { 27 | var file = field[1]; 28 | body += "Content-Disposition: form-data; name=\""+ field +"\"; filename=\""+ file.name +"\"\r\n"; 29 | body += "Content-Type: "+ file.type +"\r\n\r\n"; 30 | body += file.getAsBinary() + "\r\n"; 31 | } else { 32 | body += "Content-Disposition: form-data; name=\""+ field +"\";\r\n\r\n"; 33 | body += value + "\r\n"; 34 | } 35 | }); 36 | body += "--" + boundary +"--"; 37 | return body; 38 | }; 39 | 40 | if (window.FormData) { 41 | FormData.oldFormData = window.FormData; 42 | } 43 | 44 | window.FormData = FormData; 45 | } 46 | 47 | function unmockFormData() { 48 | "use strict"; 49 | 50 | if (window.FormData && window.FormData.oldFormData) { 51 | window.FormData = window.FormData.oldFormData; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /docs/api/events-s3.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "S3 Methods" %} 3 | 4 | {% block sidebar %} 5 | 6 | {% endblock %} 7 | 8 | {% block js_head %} 9 | 10 | {% endblock %} 11 | 12 | {% block js_footer %} 13 | 18 | {% endblock %} 19 | 20 | {% block content %} 21 | {% markdown %} 22 | 23 | # Events S3 {: .page-header } 24 | 25 | The S3 uploader provides many of the same events as the traditional 26 | uploader, but there are some additional events _exclusive_ to S3 endpoints. 27 | If you plan to use the S3 uploader, then use the following table as your event 28 | reference. **All methods outlined in the core/traditional documentation are also available 29 | in Fine Uploader S3, unless otherwise noted here.** 30 | 31 | ### Syntax 32 | 33 | The following syntax is the correct way to define event handlers: 34 | 35 | ```javascript 36 | callbacks: { 37 | onDelete: function(id) { 38 | //... 39 | }, 40 | onDeleteComplete: function(id, xhr, isError) { 41 | //... 42 | } 43 | } 44 | ``` 45 | 46 | {% endmarkdown %} 47 |
    48 | 49 | {{ api_event("credentialsExpired", "onCredentialsExpired", 50 | "Called before a request is sent to S3 if the temporary credentials have expired. You must return a promise. If your attempt to refresh the temporary credentials is successful, you must fulfill the promise via the `success` method, passing the new `credentials` object. Otherwise, call `failure` with a descriptive reason.", [])}} 51 | 52 |
    53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /docs/quickstart/03-setting_up_server-s3.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Server Set-Up S3" %} 3 | 4 | {% block content %} 5 | {% markdown %} 6 | # Server Set-Up Amazon S3 {: .page-header} 7 | 8 | For this tutorial we are going to use [Node.js](http://nodejs.org/) to develop 9 | a simple server which will accept uploads from our Fine Uploader instance. If 10 | you don't have Node.js, now's the time to [get it](http://nodejs.org/download/). 11 | 12 | If Node.js is not your style, then feel free to browse the other 13 | [server-side demos repository](http://github.com/Widen/fine-uploader-server). **It's quite important for you to read 14 | the [Amazon S3 server-side integration instructions](../endpoint_handlers/amazon-s3.html) before you do any of this, 15 | though**. 16 | 17 | #### Getting Started 18 | 19 | Let's rock! First, download [express](https://npmjs.org/package/express) and the 20 | [aws-sdk](https://npmjs.org/package/aws-sdk): 21 | 22 | `npm install express aws-sdk` 23 | 24 | Now let's download our server: 25 | 26 | `wget -O server.js https://raw.github.com/Widen/fine-uploader-server/master/nodejs/s3/s3handler.js` 27 | 28 | Then set relevant environment variables: 29 | 30 | ```bash 31 | $ export CLIENT_SECRET_KEY = 'secret' 32 | $ export SERVER_PUBLIC_KEY = 'not really secret' 33 | $ export SERVER_SECRET_KEY = 'secret' 34 | ``` 35 | 36 | And let's run it! 37 | 38 | `node server.js` 39 | 40 | Fire up the HTML page with the client-side uploader code on it, and attempt to 41 | upload. 42 | 43 | Booyakosha! You are on the fast-track to upload nirvana. Continue forth in your quest to learn to integrate Fine Uploader with your application by reviewing the rest of the [documentation](../) 44 | {% endmarkdown %} 45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Resource/ResourceIteratorClassFactoryTest.php: -------------------------------------------------------------------------------- 1 | registerNamespace('Baz'); 22 | $command = new MockCommand(); 23 | $factory->build($command); 24 | } 25 | 26 | public function testBuildsResourceIterators() 27 | { 28 | $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); 29 | $command = new MockCommand(); 30 | $iterator = $factory->build($command, array('client.namespace' => 'Guzzle\Tests\Service\Mock')); 31 | $this->assertInstanceOf('Guzzle\Tests\Service\Mock\Model\MockCommandIterator', $iterator); 32 | } 33 | 34 | public function testChecksIfCanBuild() 35 | { 36 | $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service'); 37 | $this->assertFalse($factory->canBuild(new MockCommand())); 38 | $factory = new ResourceIteratorClassFactory('Guzzle\Tests\Service\Mock\Model'); 39 | $this->assertTrue($factory->canBuild(new MockCommand())); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/aws/aws-sdk-php/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aws/aws-sdk-php", 3 | "homepage": "http://aws.amazon.com/sdkforphp", 4 | "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", 5 | "keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"], 6 | "type": "library", 7 | "license": "Apache-2.0", 8 | "authors": [ 9 | { 10 | "name": "Amazon Web Services", 11 | "homepage": "http://aws.amazon.com" 12 | } 13 | ], 14 | "support": { 15 | "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", 16 | "issues": "https://github.com/aws/aws-sdk-php/issues" 17 | }, 18 | "require": { 19 | "php": ">=5.3.3", 20 | "guzzle/guzzle": "~3.7" 21 | }, 22 | "suggest": { 23 | "doctrine/cache": "Adds support for caching of credentials and responses", 24 | "ext-apc": "Allows service description opcode caching, request and response caching, and credentials caching", 25 | "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", 26 | "monolog/monolog": "Adds support for logging HTTP requests and responses", 27 | "symfony/yaml": "Eases the ability to write manifests for creating jobs in AWS Import/Export" 28 | }, 29 | "require-dev": { 30 | "ext-openssl": "*", 31 | "doctrine/cache": "~1.0", 32 | "monolog/monolog": "~1.4", 33 | "phpunit/phpunit": "~4.0", 34 | "symfony/yaml": "~2.1" 35 | }, 36 | "autoload": { 37 | "psr-0": { 38 | "Aws": "src/" 39 | } 40 | }, 41 | "extra": { 42 | "branch-alias": { 43 | "dev-master": "2.7-dev" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Common/EventTest.php: -------------------------------------------------------------------------------- 1 | '123', 19 | 'other' => '456', 20 | 'event' => 'test.notify' 21 | )); 22 | } 23 | 24 | public function testAllowsParameterInjection() 25 | { 26 | $event = new Event(array( 27 | 'test' => '123' 28 | )); 29 | $this->assertEquals('123', $event['test']); 30 | } 31 | 32 | public function testImplementsArrayAccess() 33 | { 34 | $event = $this->getEvent(); 35 | $this->assertEquals('123', $event['test']); 36 | $this->assertNull($event['foobar']); 37 | 38 | $this->assertTrue($event->offsetExists('test')); 39 | $this->assertFalse($event->offsetExists('foobar')); 40 | 41 | unset($event['test']); 42 | $this->assertFalse($event->offsetExists('test')); 43 | 44 | $event['test'] = 'new'; 45 | $this->assertEquals('new', $event['test']); 46 | } 47 | 48 | public function testImplementsIteratorAggregate() 49 | { 50 | $event = $this->getEvent(); 51 | $this->assertInstanceOf('ArrayIterator', $event->getIterator()); 52 | } 53 | 54 | public function testConvertsToArray() 55 | { 56 | $this->assertEquals(array( 57 | 'test' => '123', 58 | 'other' => '456', 59 | 'event' => 'test.notify' 60 | ), $this->getEvent()->toArray()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/Zf2CacheAdapterTest.php: -------------------------------------------------------------------------------- 1 | cache = StorageFactory::factory(array( 23 | 'adapter' => 'memory' 24 | )); 25 | $this->adapter = new Zf2CacheAdapter($this->cache); 26 | } 27 | 28 | /** 29 | * Cleans up the environment after running a test. 30 | */ 31 | protected function tearDown() 32 | { 33 | $this->adapter = null; 34 | $this->cache = null; 35 | parent::tearDown(); 36 | } 37 | 38 | public function testCachesDataUsingCallables() 39 | { 40 | $this->assertTrue($this->adapter->save('test', 'data', 1000)); 41 | $this->assertEquals('data', $this->adapter->fetch('test')); 42 | } 43 | 44 | public function testChecksIfCacheContainsKeys() 45 | { 46 | $this->adapter->save('test', 'data', 1000); 47 | $this->assertTrue($this->adapter->contains('test')); 48 | $this->assertFalse($this->adapter->contains('foo')); 49 | } 50 | 51 | public function testDeletesFromCacheByKey() 52 | { 53 | $this->adapter->save('test', 'data', 1000); 54 | $this->assertTrue($this->adapter->contains('test')); 55 | $this->adapter->delete('test'); 56 | $this->assertFalse($this->adapter->contains('test')); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /client/js/upload-handler/upload.handler.js: -------------------------------------------------------------------------------- 1 | /* globals qq */ 2 | /** 3 | * Common upload handler functions. 4 | * 5 | * @constructor 6 | */ 7 | qq.UploadHandler = function(spec) { 8 | "use strict"; 9 | 10 | var proxy = spec.proxy, 11 | fileState = {}, 12 | onCancel = proxy.onCancel, 13 | getName = proxy.getName; 14 | 15 | qq.extend(this, { 16 | add: function(id, fileItem) { 17 | fileState[id] = fileItem; 18 | fileState[id].temp = {}; 19 | }, 20 | 21 | cancel: function(id) { 22 | var self = this, 23 | cancelFinalizationEffort = new qq.Promise(), 24 | onCancelRetVal = onCancel(id, getName(id), cancelFinalizationEffort); 25 | 26 | onCancelRetVal.then(function() { 27 | if (self.isValid(id)) { 28 | fileState[id].canceled = true; 29 | self.expunge(id); 30 | } 31 | cancelFinalizationEffort.success(); 32 | }); 33 | }, 34 | 35 | expunge: function(id) { 36 | delete fileState[id]; 37 | }, 38 | 39 | getThirdPartyFileId: function(id) { 40 | return fileState[id].key; 41 | }, 42 | 43 | isValid: function(id) { 44 | return fileState[id] !== undefined; 45 | }, 46 | 47 | reset: function() { 48 | fileState = {}; 49 | }, 50 | 51 | _getFileState: function(id) { 52 | return fileState[id]; 53 | }, 54 | 55 | _setThirdPartyFileId: function(id, thirdPartyFileId) { 56 | fileState[id].key = thirdPartyFileId; 57 | }, 58 | 59 | _wasCanceled: function(id) { 60 | return !!fileState[id].canceled; 61 | } 62 | }); 63 | }; 64 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/README.md: -------------------------------------------------------------------------------- 1 | Guzzle, PHP HTTP client and webservice framework 2 | ================================================ 3 | 4 | # This is an old version of Guzzle 5 | 6 | This repository is for Guzzle 3.x. Guzzle 4.x, the new version of Guzzle, has 7 | been released and is available at 8 | [https://github.com/guzzle/guzzle](https://github.com/guzzle/guzzle). The 9 | documentation for Guzzle version 4+ can be found at 10 | [http://guzzlephp.org](http://guzzlephp.org). 11 | 12 | ### About Guzzle 3 13 | 14 | [![Composer Downloads](https://poser.pugx.org/guzzle/guzzle/d/total.png)](https://packagist.org/packages/guzzle/guzzle) 15 | [![Build Status](https://secure.travis-ci.org/guzzle/guzzle3.png?branch=master)](http://travis-ci.org/guzzle/guzzle3) 16 | 17 | - Extremely powerful API provides all the power of cURL with a simple interface. 18 | - Truly take advantage of HTTP/1.1 with persistent connections, connection pooling, and parallel requests. 19 | - Service description DSL allows you build awesome web service clients faster. 20 | - Symfony2 event-based plugin system allows you to completely modify the behavior of a request. 21 | 22 | Get answers with: [Documentation](http://guzzle3.readthedocs.org/en/latest/), [Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle), IRC ([#guzzlephp](irc://irc.freenode.net/#guzzlephp) @ irc.freenode.net) 23 | 24 | ### Installing via Composer 25 | 26 | The recommended way to install Guzzle is through [Composer](http://getcomposer.org). 27 | 28 | ```bash 29 | # Install Composer 30 | curl -sS https://getcomposer.org/installer | php 31 | 32 | # Add Guzzle as a dependency 33 | php composer.phar require guzzle/guzzle:~3.9 34 | ``` 35 | 36 | After installing, you need to require Composer's autoloader: 37 | 38 | ```php 39 | require 'vendor/autoload.php'; 40 | ``` 41 | -------------------------------------------------------------------------------- /test/static/third-party/json2/README: -------------------------------------------------------------------------------- 1 | JSON in JavaScript 2 | 3 | 4 | Douglas Crockford 5 | douglas@crockford.com 6 | 7 | 2010-11-18 8 | 9 | 10 | JSON is a light-weight, language independent, data interchange format. 11 | See http://www.JSON.org/ 12 | 13 | The files in this collection implement JSON encoders/decoders in JavaScript. 14 | 15 | JSON became a built-in feature of JavaScript when the ECMAScript Programming 16 | Language Standard - Fifth Edition was adopted by the ECMA General Assembly 17 | in December 2009. Most of the files in this collection are for applications 18 | that are expected to run in obsolete web browsers. For most purposes, json2.js 19 | is the best choice. 20 | 21 | 22 | json2.js: This file creates a JSON property in the global object, if there 23 | isn't already one, setting its value to an object containing a stringify 24 | method and a parse method. The parse method uses the eval method to do the 25 | parsing, guarding it with several regular expressions to defend against 26 | accidental code execution hazards. On current browsers, this file does nothing, 27 | prefering the built-in JSON object. 28 | 29 | json.js: This file does everything that json2.js does. It also adds a 30 | toJSONString method and a parseJSON method to Object.prototype. Use of this 31 | file is not recommended. 32 | 33 | json_parse.js: This file contains an alternative JSON parse function that 34 | uses recursive descent instead of eval. 35 | 36 | json_parse_state.js: This files contains an alternative JSON parse function that 37 | uses a state machine instead of eval. 38 | 39 | cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle, 40 | which make it possible to encode cyclical structures and dags in JSON, and to 41 | then recover them. JSONPath is used to represent the links. 42 | http://GOESSNER.net/articles/JsonPath/ 43 | -------------------------------------------------------------------------------- /client/js/ui.handler.click.filebuttons.js: -------------------------------------------------------------------------------- 1 | /* global qq */ 2 | qq.FileButtonsClickHandler = function(s) { 3 | "use strict"; 4 | 5 | var inheritedInternalApi = {}, 6 | spec = { 7 | templating: null, 8 | log: function(message, lvl) {}, 9 | onDeleteFile: function(fileId) {}, 10 | onCancel: function(fileId) {}, 11 | onRetry: function(fileId) {}, 12 | onPause: function(fileId) {}, 13 | onContinue: function(fileId) {}, 14 | onGetName: function(fileId) {} 15 | }, 16 | buttonHandlers = { 17 | cancel: function(id) { spec.onCancel(id); }, 18 | retry: function(id) { spec.onRetry(id); }, 19 | deleteButton: function(id) { spec.onDeleteFile(id); }, 20 | pause: function(id) { spec.onPause(id); }, 21 | continueButton: function(id) { spec.onContinue(id); } 22 | }; 23 | 24 | function examineEvent(target, event) { 25 | qq.each(buttonHandlers, function(buttonType, handler) { 26 | var firstLetterCapButtonType = buttonType.charAt(0).toUpperCase() + buttonType.slice(1), 27 | fileId; 28 | 29 | if (spec.templating["is" + firstLetterCapButtonType](target)) { 30 | fileId = spec.templating.getFileId(target); 31 | qq.preventDefault(event); 32 | spec.log(qq.format("Detected valid file button click event on file '{}', ID: {}.", spec.onGetName(fileId), fileId)); 33 | handler(fileId); 34 | return false; 35 | } 36 | }); 37 | } 38 | 39 | qq.extend(spec, s); 40 | 41 | spec.eventType = "click"; 42 | spec.onHandled = examineEvent; 43 | spec.attachTo = spec.templating.getFileList(); 44 | 45 | qq.extend(this, new qq.UiEventHandler(spec, inheritedInternalApi)); 46 | }; 47 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\EventDispatcher; 13 | 14 | /** 15 | * An EventSubscriber knows himself what events he is interested in. 16 | * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes 17 | * {@link getSubscribedEvents} and registers the subscriber as a listener for all 18 | * returned events. 19 | * 20 | * @author Guilherme Blanco 21 | * @author Jonathan Wage 22 | * @author Roman Borschel 23 | * @author Bernhard Schussek 24 | * 25 | * @api 26 | */ 27 | interface EventSubscriberInterface 28 | { 29 | /** 30 | * Returns an array of event names this subscriber wants to listen to. 31 | * 32 | * The array keys are event names and the value can be: 33 | * 34 | * * The method name to call (priority defaults to 0) 35 | * * An array composed of the method name to call and the priority 36 | * * An array of arrays composed of the method names to call and respective 37 | * priorities, or 0 if unset 38 | * 39 | * For instance: 40 | * 41 | * * array('eventName' => 'methodName') 42 | * * array('eventName' => array('methodName', $priority)) 43 | * * array('eventName' => array(array('methodName1', $priority), array('methodName2')) 44 | * 45 | * @return array The event names to listen to 46 | * 47 | * @api 48 | */ 49 | public static function getSubscribedEvents(); 50 | } 51 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/ClosureCommandTest.php: -------------------------------------------------------------------------------- 1 | function($command, $api) { 27 | $command->set('testing', '123'); 28 | $request = RequestFactory::getInstance()->create('GET', 'http://www.test.com/'); 29 | return $request; 30 | } 31 | )); 32 | 33 | $client = $this->getServiceBuilder()->get('mock'); 34 | $c->setClient($client)->prepare(); 35 | $this->assertEquals('123', $c->get('testing')); 36 | $this->assertEquals('http://www.test.com/', $c->getRequest()->getUrl()); 37 | } 38 | 39 | /** 40 | * @expectedException UnexpectedValueException 41 | * @expectedExceptionMessage Closure command did not return a RequestInterface object 42 | */ 43 | public function testMustReturnRequest() 44 | { 45 | $c = new ClosureCommand(array( 46 | 'closure' => function($command, $api) { 47 | return false; 48 | } 49 | )); 50 | 51 | $client = $this->getServiceBuilder()->get('mock'); 52 | $c->setClient($client)->prepare(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Inflection/MemoizingInflectorTest.php: -------------------------------------------------------------------------------- 1 | getMock('Guzzle\Inflection\Inflector', array('snake', 'camel')); 16 | $mock->expects($this->once())->method('snake')->will($this->returnValue('foo_bar')); 17 | $mock->expects($this->once())->method('camel')->will($this->returnValue('FooBar')); 18 | 19 | $inflector = new MemoizingInflector($mock); 20 | $this->assertEquals('foo_bar', $inflector->snake('FooBar')); 21 | $this->assertEquals('foo_bar', $inflector->snake('FooBar')); 22 | $this->assertEquals('FooBar', $inflector->camel('foo_bar')); 23 | $this->assertEquals('FooBar', $inflector->camel('foo_bar')); 24 | } 25 | 26 | public function testProtectsAgainstCacheOverflow() 27 | { 28 | $inflector = new MemoizingInflector(new Inflector(), 10); 29 | for ($i = 1; $i < 11; $i++) { 30 | $inflector->camel('foo_' . $i); 31 | $inflector->snake('Foo' . $i); 32 | } 33 | 34 | $cache = $this->readAttribute($inflector, 'cache'); 35 | $this->assertEquals(10, count($cache['snake'])); 36 | $this->assertEquals(10, count($cache['camel'])); 37 | 38 | $inflector->camel('baz!'); 39 | $inflector->snake('baz!'); 40 | 41 | // Now ensure that 20% of the cache was removed (2), then the item was added 42 | $cache = $this->readAttribute($inflector, 'cache'); 43 | $this->assertEquals(9, count($cache['snake'])); 44 | $this->assertEquals(9, count($cache['camel'])); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Cache/CacheAdapterFactoryTest.php: -------------------------------------------------------------------------------- 1 | cache = new ArrayCache(); 28 | $this->adapter = new DoctrineCacheAdapter($this->cache); 29 | } 30 | 31 | /** 32 | * @expectedException \InvalidArgumentException 33 | */ 34 | public function testEnsuresConfigIsObject() 35 | { 36 | CacheAdapterFactory::fromCache(array()); 37 | } 38 | 39 | /** 40 | * @expectedException \InvalidArgumentException 41 | */ 42 | public function testEnsuresKnownType() 43 | { 44 | CacheAdapterFactory::fromCache(new \stdClass()); 45 | } 46 | 47 | public function cacheProvider() 48 | { 49 | return array( 50 | array(new DoctrineCacheAdapter(new ArrayCache()), 'Guzzle\Cache\DoctrineCacheAdapter'), 51 | array(new ArrayCache(), 'Guzzle\Cache\DoctrineCacheAdapter'), 52 | array(StorageFactory::factory(array('adapter' => 'memory')), 'Guzzle\Cache\Zf2CacheAdapter'), 53 | ); 54 | } 55 | 56 | /** 57 | * @dataProvider cacheProvider 58 | */ 59 | public function testCreatesNullCacheAdapterByDefault($cache, $type) 60 | { 61 | $adapter = CacheAdapterFactory::fromCache($cache); 62 | $this->assertInstanceOf($type, $adapter); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Iterator/ChunkedIteratorTest.php: -------------------------------------------------------------------------------- 1 | assertEquals(11, count($chunks)); 17 | foreach ($chunks as $j => $chunk) { 18 | $this->assertEquals(range($j * 10, min(100, $j * 10 + 9)), $chunk); 19 | } 20 | } 21 | 22 | public function testChunksIteratorWithOddValues() 23 | { 24 | $chunked = new ChunkedIterator(new \ArrayIterator(array(1, 2, 3, 4, 5)), 2); 25 | $chunks = iterator_to_array($chunked, false); 26 | $this->assertEquals(3, count($chunks)); 27 | $this->assertEquals(array(1, 2), $chunks[0]); 28 | $this->assertEquals(array(3, 4), $chunks[1]); 29 | $this->assertEquals(array(5), $chunks[2]); 30 | } 31 | 32 | public function testMustNotTerminateWithTraversable() 33 | { 34 | $traversable = simplexml_load_string('')->foo; 35 | $chunked = new ChunkedIterator($traversable, 2); 36 | $actual = iterator_to_array($chunked, false); 37 | $this->assertCount(2, $actual); 38 | } 39 | 40 | public function testSizeOfZeroMakesIteratorInvalid() { 41 | $chunked = new ChunkedIterator(new \ArrayIterator(range(1, 5)), 0); 42 | $chunked->rewind(); 43 | $this->assertFalse($chunked->valid()); 44 | } 45 | 46 | /** 47 | * @expectedException \InvalidArgumentException 48 | */ 49 | public function testSizeLowerZeroThrowsException() { 50 | new ChunkedIterator(new \ArrayIterator(range(1, 5)), -1); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Cookie/CookieJar/FileCookieJarTest.php: -------------------------------------------------------------------------------- 1 | file = tempnam('/tmp', 'file-cookies'); 18 | } 19 | 20 | public function testLoadsFromFileFile() 21 | { 22 | $jar = new FileCookieJar($this->file); 23 | $this->assertEquals(array(), $jar->all()); 24 | unlink($this->file); 25 | } 26 | 27 | public function testPersistsToFileFile() 28 | { 29 | $jar = new FileCookieJar($this->file); 30 | $jar->add(new Cookie(array( 31 | 'name' => 'foo', 32 | 'value' => 'bar', 33 | 'domain' => 'foo.com', 34 | 'expires' => time() + 1000 35 | ))); 36 | $jar->add(new Cookie(array( 37 | 'name' => 'baz', 38 | 'value' => 'bar', 39 | 'domain' => 'foo.com', 40 | 'expires' => time() + 1000 41 | ))); 42 | $jar->add(new Cookie(array( 43 | 'name' => 'boo', 44 | 'value' => 'bar', 45 | 'domain' => 'foo.com', 46 | ))); 47 | 48 | $this->assertEquals(3, count($jar)); 49 | unset($jar); 50 | 51 | // Make sure it wrote to the file 52 | $contents = file_get_contents($this->file); 53 | $this->assertNotEmpty($contents); 54 | 55 | // Load the cookieJar from the file 56 | $jar = new FileCookieJar($this->file); 57 | 58 | // Weeds out temporary and session cookies 59 | $this->assertEquals(2, count($jar)); 60 | unset($jar); 61 | unlink($this->file); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /docs/quickstart/03-setting_up_server.jmd: -------------------------------------------------------------------------------- 1 | {% extends "_templates/base.html" %} 2 | {% set page_title = "Server Set-Up" %} 3 | 4 | {% block content %} 5 | {% markdown %} 6 | # Server Set-Up {: .page-header} 7 | 8 | {{ alert( 9 | """This section of the tutorial is aimed at beginners looking to create their 10 | own upload server. Note that this example does not apply to S3 uploads. For 11 | more information on uploading to Amazon's Simple Storage Service, 12 | read the [Fine Uploader S3 server documentation](../endpoint_handlers/amazon-s3.html).""", 13 | "warn") }} 14 | 15 | For this tutorial we are going to use [Node.js](http://nodejs.org/) to develop 16 | a simple server which will accept uploads from our Fine Uploader instance. If 17 | you don't have Node.js, now's the time to [get it](http://nodejs.org/download/). 18 | 19 | If Node.js is not your style, then feel free to browse the other 20 | [server-side demos repository](http://github.com/Widen/fine-uploader-server). **It's quite important for you to read 21 | the [traditional server-side integration instructions](../endpoint_handlers/traditional.html) before you do any of this, 22 | though**. 23 | 24 | #### Getting Started 25 | 26 | Let's rock! First, download express: 27 | 28 | `npm install express rimraf mkdirp` 29 | 30 | Now let's download our server: 31 | 32 | `wget -O server.js https://raw.github.com/Widen/fine-uploader-server/master/nodejs/nodejs.js` 33 | 34 | Coooool. Create a new file in your text editor called `server.js`. Time to code the first part of the server: 35 | 36 | And let's have node run it! 37 | 38 | `node server.js` 39 | 40 | Make sure to set the request endpoint on your Fine Uploader instance to point to the corresponding URL on the express server. In this case, the endpoint is `/uploads`. 41 | 42 | Booyakosha! You are on the fast-track to upload nirvana. Continue forth in your quest to learn to integrate Fine Uploader with your application by reviewing the rest of the [documentation](../) 43 | {% endmarkdown %} 44 | {% endblock %} 45 | -------------------------------------------------------------------------------- /test/dev/handlers/s3/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Command/LocationVisitor/Request/QueryVisitorTest.php: -------------------------------------------------------------------------------- 1 | getNestedCommand('query')->getParam('foo')->setSentAs('test'); 16 | $visitor->visit($this->command, $this->request, $param, '123'); 17 | $this->assertEquals('123', $this->request->getQuery()->get('test')); 18 | } 19 | 20 | /** 21 | * @covers Guzzle\Service\Command\LocationVisitor\Request\QueryVisitor 22 | * @covers Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::resolveRecursively 23 | */ 24 | public function testRecursivelyBuildsQueryStrings() 25 | { 26 | $command = $this->getCommand('query'); 27 | $command->getOperation()->getParam('foo')->setSentAs('Foo'); 28 | $request = $command->prepare(); 29 | $this->assertEquals( 30 | 'Foo[test][baz]=1&Foo[test][Jenga_Yall!]=HELLO&Foo[bar]=123', 31 | rawurldecode($request->getQuery()) 32 | ); 33 | } 34 | 35 | /** 36 | * @covers Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::resolveRecursively 37 | */ 38 | public function testFiltersAreAppliedToArrayParamType() 39 | { 40 | $command = $this->getCommandWithArrayParamAndFilters(); 41 | $request = $command->prepare(); 42 | $query = $request->getQuery(); 43 | // param type 'string' 44 | $this->assertEquals('BAR', $query->get('Foo')); 45 | // param type 'array' 46 | $this->assertEquals('123,456,789', $query->get('Arr')); 47 | } 48 | } 49 | --------------------------------------------------------------------------------