{"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"keywords":["upload"],"dist-tags":{"latest":"3.0.0"},"author":{"name":"farthinker"},"description":"A HTML5 upload component without UI","readme":"Simple Uploader\n=============\n\n[![Latest Version](https://img.shields.io/npm/v/simple-uploader.svg)](https://www.npmjs.com/package/simple-uploader)\n[![Build Status](https://img.shields.io/travis/mycolorway/simple-uploader.svg)](https://travis-ci.org/mycolorway/simple-uploader)\n[![Coveralls](https://img.shields.io/coveralls/mycolorway/simple-uploader.svg)](https://coveralls.io/github/mycolorway/simple-uploader)\n[![David](https://img.shields.io/david/mycolorway/simple-uploader.svg)](https://david-dm.org/mycolorway/simple-uploader)\n[![David](https://img.shields.io/david/dev/mycolorway/simple-uploader.svg)](https://david-dm.org/mycolorway/simple-uploader#info=devDependencies)\n[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/mycolorway/simple-uploader)\n\n\nA HTML5 upload component which provides full control of UI styles.\n\n\n## Installation\n\nInstall via npm:\n\n```bash\nnpm install --save simple-uploader\n```\n\nInstall via bower:\n\n```bash\nbower install --save simple-uploader\n```\n\n## Usage\n\n```html\n<script type=\"text/javascript\" src=\"[script path]/jquery.js\"></script>\n<script type=\"text/javascript\" src=\"[script path]/simple-module.js\"></script>\n<script type=\"text/javascript\" src=\"[script path]/simple-uploader.js\"></script>\n\n<input type=\"file\" id=\"upload-file\" />\n```\n\n```js\nvar uploader = simple.uploader({\n  url: '/upload/url'\n});\n\n$('#upload-file').on('change', function(e) {\n  uploader.upload(this.files);\n});\n```\n\n## Options\n\n__url__\n\nString, required, specify the upload API url on server.\n\n__params__\n\nHash, specify extra params which will be sent to server with file data.\n\n__fileKey__\n\nString, specify the name that server will use to get file data.\n\n__connectionCount__\n\nNumber, 3 by default, specify max number of upload connection that can exist simultaneously.\n\n## Methods\n\n__upload__ ([File Object]/[File Element]/[File Array])\n\nUse this method to start uploading, accept file object or `input:file` element or file object arrays as the only param.\n\n__cancel__ ([File Object]/fileId)\n\nCancel uploading a specific file and remove it from the upload queue.\n\n__destroy__\n\nCancel all uploadings and destroy the component instance.\n\n\n__readImageFile__ ([File Object], callback)\n\nGet base64 data of an image file, which is useful to preview image before uplloading.\n\n## Events\n\n__beforeupload__ (e, file)\n\nTriggered before uploading, return false to cancel uploading.\n\n__uploadprogress__ (e, file, loaded, total)\n\nTriggered multiple times during uploading process.\n\n__uploadsuccess__ (e, file, result)\n\nTriggered after uploading complete and response status is 200.\n\n__uploaderror__ (e, file, xhr, status)\n\nTriggered after uploading complete and response status is not 200.\n\n__uploadcomplete__ (e, file, responseText)\n\nTriggered after uploading complete.\n\n__uploadcancel__ (e, file)\n\nTriggered when a uploading is canceled by `cancel()` method\n\n\n## Development\n\nClone repository from github:\n\n```bash\ngit clone https://github.com/mycolorway/simple-uploader.git\n```\n\nInstall npm dependencies:\n\n```bash\nnpm install\n```\n\nRun default gulp task to build project, which will compile source files, run test and watch file changes for you:\n\n```bash\ngulp\n```\n\nNow, you are ready to go.\n\n## Publish\n\nIf you want to publish new version to npm and bower, please make sure all tests have passed before you publish new version, and you need do these preparations:\n\n* Check the version number in `bower.json` and `package.json`.\n\n* Add new release information in `CHANGELOG.md`. The format of markdown contents will matter, because build scripts will get version and release content from this file by regular expression. You can follow the format of the older release information.\n\n* Put your [personal API tokens](https://github.com/blog/1509-personal-api-tokens) in `/.token`, which is required by the build scripts to request [Github API](https://developer.github.com/v3/) for creating new release.\n\n* Commit changes and push.\n\nNow you can run `gulp publish` task, which will request Github API to create new release.\n\nIf everything goes fine, you can see your release at [https://github.com/mycolorway/simple-uploader/releases](https://github.com/mycolorway/simple-uploader/releases). At the End you can publish new version to npm with the command:\n\n```bash\nnpm publish\n```\n\nPlease be careful with the last step, because you cannot delete or republish a release on npm.\n","repository":{"type":"git","url":"git+ssh://git@github.com/mycolorway/simple-uploader.git"},"bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"license":"MIT","versions":{"2.0.4":{"name":"simple-uploader","version":"2.0.4","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git@github.com:mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"main":"lib/uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","dependencies":{"jquery":"2.x","simplemodule":"2.x"},"devDependencies":{"grunt":"~0.4.5","grunt-contrib-watch":"0.x","grunt-contrib-coffee":"0.x","grunt-contrib-jasmine":"0.x","grunt-umd":"2.x","grunt-express":"1.4.0","express":"~3.3.4"},"scripts":{"start":"node server.js"},"gitHead":"b7aa160a1459ea2e7df9601b092c806262bcd409","_id":"simple-uploader@2.0.4","_shasum":"0e277dd476c47521b9b61d99ab883f7b84d73295","_from":".","_npmVersion":"2.6.0","_nodeVersion":"0.10.22","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"dist":{"shasum":"0e277dd476c47521b9b61d99ab883f7b84d73295","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-2.0.4.tgz"},"directories":{}},"2.0.5":{"name":"simple-uploader","version":"2.0.5","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git@github.com:mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"main":"lib/uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","dependencies":{"jquery":"2.x","simplemodule":"2.x"},"devDependencies":{"grunt":"~0.4.5","grunt-contrib-watch":"0.x","grunt-contrib-coffee":"0.x","grunt-contrib-jasmine":"0.x","grunt-umd":"2.x","grunt-express":"1.4.0","express":"~3.3.4"},"scripts":{"start":"node server.js"},"gitHead":"cdea63173a366247edf1d7060e8eb24359f5307a","_id":"simple-uploader@2.0.5","_shasum":"e7c819ee4be2f490c4212578d61d7361515fe338","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"dist":{"shasum":"e7c819ee4be2f490c4212578d61d7361515fe338","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-2.0.5.tgz"},"directories":{}},"2.0.6":{"name":"simple-uploader","version":"2.0.6","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git@github.com:mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"main":"lib/uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","dependencies":{"jquery":"2.x","simple-module":"~2.0.5"},"devDependencies":{"grunt":"~0.4.5","grunt-contrib-watch":"0.x","grunt-contrib-coffee":"0.x","grunt-contrib-jasmine":"0.x","grunt-umd":"2.x","grunt-express":"1.4.0","express":"~3.3.4"},"scripts":{"start":"node server.js"},"gitHead":"28518d4b4012861350d960f9d5e51a0c5fa15c48","_id":"simple-uploader@2.0.6","_shasum":"ee9be9b99841498e4760483147e10532a24cc7f0","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"dist":{"shasum":"ee9be9b99841498e4760483147e10532a24cc7f0","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-2.0.6.tgz"},"directories":{}},"2.0.7":{"name":"simple-uploader","version":"2.0.7","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git@github.com:mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"main":"lib/uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","dependencies":{"jquery":"2.x","simple-module":"~2.0.5"},"devDependencies":{"grunt":"~0.4.5","grunt-contrib-watch":"0.x","grunt-contrib-coffee":"0.x","grunt-contrib-jasmine":"0.x","grunt-umd":"2.x","grunt-express":"1.4.0","express":"~3.3.4"},"scripts":{"start":"node server.js"},"gitHead":"e077a3a9255393ca61ce12f8e19e43d3e354d8c0","_id":"simple-uploader@2.0.7","_shasum":"babb0f5e30c863d3a4dc22354df5752ddfd477d4","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"dist":{"shasum":"babb0f5e30c863d3a4dc22354df5752ddfd477d4","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-2.0.7.tgz"},"directories":{}},"2.0.8":{"name":"simple-uploader","version":"2.0.8","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git+ssh://git@github.com/mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"main":"lib/uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","dependencies":{"jquery":"2.x","simple-module":"~2.0.5"},"devDependencies":{"grunt":"~0.4.5","grunt-contrib-watch":"0.x","grunt-contrib-coffee":"0.x","grunt-contrib-jasmine":"0.x","grunt-umd":"2.x","grunt-express":"1.4.0","express":"~3.3.4"},"scripts":{"start":"node server.js"},"gitHead":"83ba979df0fa9127aaf90ea40fe1566cdcbf9710","_id":"simple-uploader@2.0.8","_shasum":"5fc4106c6d968b0b353293e3b16094aafde957ba","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"dist":{"shasum":"5fc4106c6d968b0b353293e3b16094aafde957ba","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-2.0.8.tgz"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/simple-uploader-2.0.8.tgz_1456053238695_0.41196906799450517"},"directories":{}},"3.0.0":{"name":"simple-uploader","githubOwner":"mycolorway","version":"3.0.0","description":"A HTML5 upload component without UI","keywords":["upload"],"repository":{"type":"git","url":"git+ssh://git@github.com/mycolorway/simple-uploader.git"},"author":{"name":"farthinker"},"license":"MIT","bugs":{"url":"https://github.com/mycolorway/simple-uploader/issues"},"scripts":{"start":"gulp","test":"gulp test"},"main":"dist/simple-uploader.js","homepage":"https://github.com/mycolorway/simple-uploader","umd":{"name":"SimpleUploader","dependencies":{"cjs":["jquery","simple-module"],"global":["jQuery","SimpleModule"],"params":["$","SimpleModule"]}},"dependencies":{"jquery":"~3.1.0","simple-module":"~3.0.0"},"devDependencies":{"browserify":"^13.0.0","browserify-coffee-coverage":"^1.1.1","chai":"^3.5.0","coffee-script":"^1.10.0","coffeelint":"^1.15.0","coveralls":"^2.11.8","gulp":"github:gulpjs/gulp#4.0","gulp-util":"^3.0.7","istanbul":"^0.4.2","karma":"^1.1.1","karma-browserify":"^5.0.5","karma-chai":"^0.1.0","karma-coffee-coverage":"^1.1.2","karma-coverage":"^1.0.0","karma-mocha":"^1.0.1","karma-mocha-reporter":"^2.0.4","karma-phantomjs-launcher":"^1.0.0","karma-sinon":"^1.0.5","lodash":"^4.13.1","mocha":"^2.5.3","node-sass":"^3.8.0","phantomjs-prebuilt":"^2.1.7","sinon":"^1.17.5","through2":"^2.0.1","uglify-js":"^2.6.2","watchify":"^3.7.0"},"gitHead":"00ded92c04e2cb4048775c0aadc8c09d7f1dcc01","_id":"simple-uploader@3.0.0","_shasum":"c09f706f1cfcbea1fe780e35759a683b1336d4d1","_from":".","_npmVersion":"3.8.1","_nodeVersion":"5.8.0","_npmUser":{"name":"farthinker","email":"farthinker@gmail.com"},"maintainers":[{"name":"farthinker","email":"farthinker@gmail.com"}],"dist":{"shasum":"c09f706f1cfcbea1fe780e35759a683b1336d4d1","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/simple-uploader/-/simple-uploader-3.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/simple-uploader-3.0.0.tgz_1470136566084_0.9847128216642886"},"directories":{}}},"name":"simple-uploader","time":{"modified":"2016-08-02T11:16:07.070Z","created":"2015-02-23T13:27:55.682Z","2.0.3":"2015-02-23T13:27:55.682Z","2.0.4":"2015-02-23T14:22:52.648Z","2.0.5":"2015-04-28T09:15:53.267Z","2.0.6":"2015-05-19T03:10:05.182Z","2.0.7":"2015-05-20T02:11:45.795Z","2.0.8":"2016-02-21T11:14:01.619Z","3.0.0":"2016-08-02T11:16:07.070Z"},"readmeFilename":"README.md","homepage":"https://github.com/mycolorway/simple-uploader"}