{"_id":"@byzg/dropzone","_rev":"4-74fef3b12b743baf6ec41c5aea5a5e12","name":"@byzg/dropzone","dist-tags":{"latest":"5.5.4"},"versions":{"5.5.1":{"name":"@byzg/dropzone","version":"5.5.1","description":"Handles drag and drop of files for you.","keywords":["dragndrop","drag and drop","file upload","upload"],"homepage":"http://www.dropzonejs.com","main":"./dist/dropzone.js","maintainers":[{"name":"byzg","email":"byzg00@gmail.com"}],"contributors":[{"name":"Matias Meno","email":"m@tias.me","url":"http://www.colorglare.com"}],"scripts":{"test":"grunt && npm run test-prebuilt","test-prebuilt":"mocha-headless-chrome -f test/test-prebuilt.html -a no-sandbox -a disable-setuid-sandbox"},"bugs":{"url":"https://gitlab.com/meno/dropzone/issues","email":"m@tias.me"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/meno/dropzone.git"},"devDependencies":{"babel-preset-env":"^1.5.2","chai":"1.7.x","grunt":"^1.0.0","grunt-babel":"^6.0.0","grunt-contrib-concat":"^1.0.1","grunt-contrib-sass":"^1.0.0","grunt-contrib-uglify":"^2.1.0","grunt-contrib-watch":"^1.0.0","grunt-text-replace":"^0.4.0","marked":"^0.3.6","mocha":"^3.2.0","mocha-headless-chrome":"^1.8.0","sinon":"1.17.7"},"gitHead":"4a89782ba1d93c8e2163869cd140f0caf498521b","_id":"@byzg/dropzone@5.5.1","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"byzg","email":"byzg00@gmail.com"},"dist":{"integrity":"sha512-y7S6JQI/7kaD5LmrbYlyfSaLODxnPkAdODRSKgmwvUP0Ns0jEEikhQ3QgmArBUwMU4TSrxkUqPSxdaVDl8KzPA==","shasum":"3da227338e05b2a58569f2a1612ac5b7bdc1f852","tarball":"https://registry.npmjs.org/@byzg/dropzone/-/dropzone-5.5.1.tgz","fileCount":14,"unpackedSize":47208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSueVCRA9TVsSAnZWagAAszEQAInzASaHkh3PiSTq1uI9\nIQ1s0i0hngNzWWLspagDILqrnnPmmhJiKtrPJmbhY12Gr0xvZPPRwMoz4hR2\nvPdabwb37PHI/SsgqraEZQxM8lDVmdvDCXcWsEjINWiXMV6UrUMk4FEoLbgg\nLMEmNhS1FbDQBGDRlosEJPH3fUiAqURNzDd2sz2XbDbc9ogjHUmA1AtsTwYL\nm+N+RIZNaR1Bk2gBWTXcyl63e0Nl5MNKjHsyBVxBt2ZZdNDtVRcnXzQTJ9Qo\nDfd3j/CyEA6cjm2k7qlSgdgRA5QwPihmwz26ZvsGeBRGg7RtZjRrMRfo56+D\nNsAgNZdcxCyDUiIn10wApOa5m9svZwQM37HyKwwAYlvHAJKxsROe6sr3ZSr2\n4AySsNPBca0vnllk4Cy4yf4ERc9/dqmMAvFf4ahLgKYvBprf/4aZB0RSzSeT\nQgZunlsRKeXbpggMz/arxbsa9vOE4v5Mh68ykiTnIDzYCOpYzql/fMBuxhL5\ngPuMuGyCg4UaxIxmb7W21rppCHn2JRCrk/3XSYMZK9uV4S+mBZeBuu6PNfeU\n0TICkWLxY2txH/TnSKdlVbHNd2nkQuVsHK/cfh9YzPrYBtCIyK++Ndo5SoC/\nvJi6lza8DWK/Rlrjs5lQ0+k/NKEHPicXqAYTrBB6PY4+AD8ZAs5AhsIhjAU/\nfS4z\r\n=UHF4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD35UZWcRTI16kYHXxWKsWz8QzUfQSot+hCH4KxhXougQIhAL4yYotFez8/vhOPHkk9CrwuH8ykC25fP76OhPPiyrmt"}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dropzone_5.5.1_1565190036880_0.13064446926720663"},"_hasShrinkwrap":false},"5.5.2":{"name":"@byzg/dropzone","version":"5.5.2","description":"Handles drag and drop of files for you.","keywords":["dragndrop","drag and drop","file upload","upload"],"homepage":"http://www.dropzonejs.com","main":"./dist/dropzone.js","maintainers":[{"name":"byzg","email":"byzg00@gmail.com"}],"contributors":[{"name":"Matias Meno","email":"m@tias.me","url":"http://www.colorglare.com"}],"scripts":{"test":"grunt && npm run test-prebuilt","test-prebuilt":"mocha-headless-chrome -f test/test-prebuilt.html -a no-sandbox -a disable-setuid-sandbox"},"bugs":{"url":"https://gitlab.com/meno/dropzone/issues","email":"m@tias.me"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/meno/dropzone.git"},"devDependencies":{"babel-preset-env":"^1.5.2","chai":"1.7.x","grunt":"^1.0.0","grunt-babel":"^6.0.0","grunt-contrib-concat":"^1.0.1","grunt-contrib-sass":"^1.0.0","grunt-contrib-uglify":"^2.1.0","grunt-contrib-watch":"^1.0.0","grunt-text-replace":"^0.4.0","marked":"^0.3.6","mocha":"^3.2.0","mocha-headless-chrome":"^1.8.0","sinon":"1.17.7"},"gitHead":"4a89782ba1d93c8e2163869cd140f0caf498521b","_id":"@byzg/dropzone@5.5.2","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"byzg","email":"byzg00@gmail.com"},"dist":{"integrity":"sha512-bTgHdwFLDfFAReoXihZGgbzq0wjfwIc0RiK3fBMOuhvtHXJPuv6BaKEzxtrO7DGLol4LXjWqiUk/0o1ir86E1w==","shasum":"e0dc0ee59b81eb511549f14b069e864799824b3c","tarball":"https://registry.npmjs.org/@byzg/dropzone/-/dropzone-5.5.2.tgz","fileCount":19,"unpackedSize":165424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSvHYCRA9TVsSAnZWagAAUEMQAJ9xbiknwH+0UBn4gdaU\n7x4o1W7szQuSeT7e0ZJQAa2zoSFzZkCcLzrqLR13NiUdTkmRO2QLgVpRKguw\nW+a77qpuaVSDPx+ng5ouFIPl/+Azii354/yiJPJSxVMmAFJocY7mjFxxICc7\nYtZPiLpWs0LLSwl1TKHs6WePj37yald935C0xlbprzEq89QxcQn3OFcTWodU\nJ1nY8cvNWsVAa/pxJOMR3L9W7hFia6OExBUzfjVrJCr1pYa2I9MLhjvjw4fY\nmFlh5b/BzG7yvUV/nAFVHdLRxL8HKLCQ3DGBGGX+xWreopy1+Pv+SICDODsG\nwP3oLVzNqlyL+hvGH29sBMRGf1fk7LURscCIooccsGMPiBR8r5YF6t1BFlxY\ncexUxN27PNcrb0wKhIy8sn/OGx51wxlXUNPWy0u4qvogC5UIl1f4dPM16M85\nfwwi7kttxw3QKnB3d9HsWEx7syXuzupPkOcIeNJuRVwoeYqY9X4+HZs4s5mu\n37A6foBF0qcxbLcj3RvwI4wUMQVMog8ALmjQ5B7rtaY1djoV4+sDJZtmmNqO\nNXU2KS1kMRsIxLsaKWsIss1UEYTqIQvIuWrtdC9DdRL+cA9ilWPHA/XA9EFH\nqE5ia0KaSs3/pO5sURzfa/dyz2ZJVAsD59aGfXIvaXyHDyW29nC2G20h73eM\nMqg/\r\n=gHkn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECoI0jMWSVz00iHesyEj20aJe7xr11flJJjtoJtPSxIAiAok2HblGpxWPcT4ZrvHcmUI+RAY7EXRPoxx2PVqwXylA=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dropzone_5.5.2_1565192663601_0.7081160670053002"},"_hasShrinkwrap":false},"5.5.3":{"name":"@byzg/dropzone","version":"5.5.3","description":"Handles drag and drop of files for you.","keywords":["dragndrop","drag and drop","file upload","upload"],"homepage":"http://www.dropzonejs.com","main":"./dist/dropzone.js","maintainers":[{"name":"byzg","email":"byzg00@gmail.com"}],"contributors":[{"name":"Matias Meno","email":"m@tias.me","url":"http://www.colorglare.com"}],"scripts":{"test":"grunt && npm run test-prebuilt","test-prebuilt":"mocha-headless-chrome -f test/test-prebuilt.html -a no-sandbox -a disable-setuid-sandbox"},"bugs":{"url":"https://gitlab.com/meno/dropzone/issues","email":"m@tias.me"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/meno/dropzone.git"},"devDependencies":{"babel-preset-env":"^1.5.2","chai":"1.7.x","grunt":"^1.0.0","grunt-babel":"^6.0.0","grunt-contrib-concat":"^1.0.1","grunt-contrib-sass":"^1.0.0","grunt-contrib-uglify":"^2.1.0","grunt-contrib-watch":"^1.0.0","grunt-text-replace":"^0.4.0","marked":"^0.3.6","mocha":"^3.2.0","mocha-headless-chrome":"^1.8.0","sinon":"1.17.7"},"gitHead":"1ae7ea5adbf95ed814885a72d6b9682c5a14f836","_id":"@byzg/dropzone@5.5.3","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"byzg","email":"byzg00@gmail.com"},"dist":{"integrity":"sha512-Vkd7uHtM4GV9NzaL7gd+hNn4sO4JgtXR6EhCV8XBO8Yrd7kNhOvvLquoMi9/BiOlsSN6mN1kGYg0Pd4cLxKi8A==","shasum":"9e46b568c4047a37a473108d61dde13e0ddc6ef3","tarball":"https://registry.npmjs.org/@byzg/dropzone/-/dropzone-5.5.3.tgz","fileCount":19,"unpackedSize":165670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSvg1CRA9TVsSAnZWagAAgoIP/jcGJtkiTi6E8U1d3Jna\nzhqqGrNCD7x1QHN4ER5oi42EajX7I55q+xpr1V/PrL8P2CHc0BrtiUfMXGXx\n1bXfI5LyhDMqXal0pxKpJeO2I4tczrgIdMdGTVP+yyMo4sHnJN6ldu1gss2F\nURDVmGswpXSeHPQ0SDfQsnZY8tSngbK33cv8ccjZNuWwHlmre8E6vXGvavHN\nwT18aKSQb3KcKLaXALcc+QerU+FnChpLB9II1EuWlCNUaJ7sKgzJwfnhLF+P\nZC5uSW1z0GvQEeh/IrYphJv1ZzpBh6jRY7uZJ5GNPFY0imczn0GAOX8rBnXT\nXKHye/WJjGTMSzapb8l3WVrqhRKS/pOf4lkHnWy+VtBF0MFju2Xfv9SpAd+e\nAPDZRKtoknGb0oF2ToVp3YgMCIEb4G8aOkndHawgSaBpvMoCGvzg3YfUrbvD\nFhCrgsgrPcXerSS4zowMTXZfpV6WuaOWy/3At+lDJQR3ykciWLi/TESjwPPh\nxFodQjMLsKx+28sRV6s880nRIExMk+a5RK5GLsyHES0KsEn0T38wgXKGLGyg\nsbN8zjYGabImcxhkeupVjM8DGEb8jaHa98dANPx6wm599HRYgv+cfzsv18P6\n2rOtE1upzCmrtL2ojI2Lfp+G9Jdt65EzVO5FSdsBBtYuQGBKioUTeRSp8yTD\nTlUg\r\n=0LYj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxte4QDxgH9CBC5VLcQku7ljD8kn9Q3E3VBk35chmGAAiBZvz3LukhRDDDZHFk701+Oetw4Da3nsZucIrdQofEkkA=="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dropzone_5.5.3_1565194293012_0.9094112108493162"},"_hasShrinkwrap":false},"5.5.4":{"name":"@byzg/dropzone","version":"5.5.4","description":"Handles drag and drop of files for you.","keywords":["dragndrop","drag and drop","file upload","upload"],"homepage":"http://www.dropzonejs.com","main":"./dist/dropzone.js","maintainers":[{"name":"byzg","email":"byzg00@gmail.com"}],"contributors":[{"name":"Matias Meno","email":"m@tias.me","url":"http://www.colorglare.com"}],"scripts":{"test":"grunt && npm run test-prebuilt","test-prebuilt":"mocha-headless-chrome -f test/test-prebuilt.html -a no-sandbox -a disable-setuid-sandbox"},"bugs":{"url":"https://gitlab.com/meno/dropzone/issues","email":"m@tias.me"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/meno/dropzone.git"},"devDependencies":{"babel-preset-env":"^1.5.2","chai":"1.7.x","grunt":"^1.0.0","grunt-babel":"^6.0.0","grunt-contrib-concat":"^1.0.1","grunt-contrib-sass":"^1.0.0","grunt-contrib-uglify":"^2.1.0","grunt-contrib-watch":"^1.0.0","grunt-text-replace":"^0.4.0","marked":"^0.3.6","mocha":"^3.2.0","mocha-headless-chrome":"^1.8.0","sinon":"1.17.7"},"gitHead":"1ae7ea5adbf95ed814885a72d6b9682c5a14f836","_id":"@byzg/dropzone@5.5.4","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"byzg","email":"byzg00@gmail.com"},"dist":{"integrity":"sha512-uxy2bwUxDeyoXJ2NQjux7iuBXBQoxsOtzjR1GzkVnlwWwC4gNOLmDoANEDCAnNtFFKPQ420NqgFwotwq3ymi+w==","shasum":"58b88687e912ef9f9cc910fdf258cc17bf969101","tarball":"https://registry.npmjs.org/@byzg/dropzone/-/dropzone-5.5.4.tgz","fileCount":26,"unpackedSize":675357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSvjtCRA9TVsSAnZWagAAZpYP+wdycEOgHnUEbK4aP1mf\nZkM5HuoWrWOokX3RXceZAxcQmyxKEGyiDuekfdeMDsNg3U7msFiUCGar7HEy\napfXY2/Yinsl4kbAUNcaPFjcmn13m+oc0K4UVj5APZQv9YjZPX7j9dksMxG3\nQDcXDSyzSNXUWl0Nj1yfKrEKgpfXJU6Ygi/77ORk4gS5r3ErEiROVak4CJGv\nqRPiCKKevjrl1opruZHKh3v/qarZ2bk18Ull5y4X5ls3cLtGej6GMx5NjviO\naTNB6m9fzVVsNc5m0IWjAi8a1QlP25L2w71DckxYXTFe1tzLa4hiVI/NYQYp\nXpdxHyPY7Z6MwlMRsfMqbJayFsyH4+8Sq2uPnd+EbIzLsrHJY+QjVHsZ6B6c\ntWj+2oD67dj66hVMdoWe2mA/juPfss2ZEwO/5bkH3jNuM49PfNbDTSjDfoU6\nb/FQPXsE113cXueyR0shq1X1K2JFSvQuG49F5WfOOBxax38cxgRCIq4SiUM0\nRmHaZwA6GiNH6xdSaBRXLTSiMCESR0q0/AJr+bVy8U8AUYP+XweO4zP6jRHf\nxa/qLS6cmlLDxfhzV95hJBZCXvv8dXxx7Y5FwyzudsIIPIcMT+VP5OfKYI4R\nVDmiCJHlVur8D4v9wWHj6XmGXhbPLMVzTFJqp9tx3QY4EHT6MetzOpvNuJTj\nouYm\r\n=Hek1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6svAMLfhvgN00SL22b+88nKnDCA6LTUSaL9dJadia1QIgKyqeRHfYguNsKmJOpVpTHqRZkC7t4lwsvHhpfTiRcJY="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dropzone_5.5.4_1565194476343_0.5950199586878282"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-07T15:00:36.660Z","5.5.1":"2019-08-07T15:00:37.027Z","modified":"2022-04-04T21:23:30.617Z","5.5.2":"2019-08-07T15:44:23.734Z","5.5.3":"2019-08-07T16:11:33.253Z","5.5.4":"2019-08-07T16:14:36.542Z"},"maintainers":[{"name":"byzg","email":"byzg00@gmail.com"}],"description":"Handles drag and drop of files for you.","homepage":"http://www.dropzonejs.com","keywords":["dragndrop","drag and drop","file upload","upload"],"repository":{"type":"git","url":"git+https://gitlab.com/meno/dropzone.git"},"contributors":[{"name":"Matias Meno","email":"m@tias.me","url":"http://www.colorglare.com"}],"bugs":{"url":"https://gitlab.com/meno/dropzone/issues","email":"m@tias.me"},"license":"MIT","readme":"## Publish\nNeed to install grunt, ruby and Sass (if is absent):\n\n`sudo apt install node-grunt-cli`\n\n`sudo apt install ruby-full rubygems autogen autoconf libtool make`\n\n`sudo gem install sass`\n\nRun build: `grunt default`\n\nPublish: `npm publish`\n\n<img alt=\"Dropzone.js\" src=\"http://www.dropzonejs.com/images/new-logo.svg\" />\n\nDropzone.js is a light weight JavaScript library that turns an HTML element into a dropzone.\nThis means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX.\n\n* * *\n\n_If you want support, please use [stackoverflow](http://stackoverflow.com/) with the `dropzone.js` tag and not the\nGitLab issues tracker. Only post an issue here if you think you discovered a bug or have a feature request._\n\n* * *\n\n**Please read the [contributing guidelines](CONTRIBUTING.md) before you start working on Dropzone!**\n\n<br>\n<div align=\"center\">\n  <a href=\"https://gitlab.com/meno/dropzone/builds/artifacts/master/download?job=release\"><strong>&gt;&gt; Download &lt;&lt;</strong></a>\n</div>\n<br>\n<br>\n\nDropzone does **not** depend on jQuery.\n\nDropzone is compatible with bower, there's a standalone version of Dropzone, an [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)\nmodule that's compatible with [RequireJS](http://requirejs.org) in the downloads\nfolder.\n\n<img alt=\"Dropzone Screenshot\" width=\"585\" src=\"http://i.imgur.com/Xf7QvVG.png\" />\n\n## Main features\n\n- Image thumbnail previews. Simply register the callback `thumbnail(file, data)` and display the image wherever you like\n- Retina enabled\n- Multiple files and synchronous uploads\n- Progress updates\n- Support for large files\n- Complete theming. The look and feel of Dropzone is just the default theme. You\n  can define everything yourself by overwriting the default event listeners.\n- Browser image resizing (resize the images before you upload them to your server)\n- Well tested\n\n## Documentation\n\nFor the full documentation and installation please visit [www.dropzonejs.com](http://www.dropzonejs.com)\n\nPlease also refer to the [FAQ](https://github.com/enyo/dropzone/wiki/FAQ).\n\n## Examples\n\nFor examples, please see the [GitLab wiki](https://gitlab.com/meno/dropzone/wikis/home).\n\n\n# Installation\n\nYou probably only need to look at the [simple example](http://www.dropzonejs.com/examples/simple.html) ([source](https://gitlab.com/meno/dropzone/raw/master/website/examples/simple.html))\nto get started. Continue reading for step by step instructions and different\ninstallation approaches.\n\n* * *\n\nDownload the standalone [dropzone.js](https://gitlab.com/meno/dropzone/builds/artifacts/master/file/dist/dropzone.js?job=release)\nand include it like this:\n\n```html\n<script src=\"./path/to/dropzone.js\"></script>\n```\n\nDropzone is now activated and available as `window.Dropzone`.\n\n> Dropzone does *not* handle your file uploads on the server. You have to implement\n> the code to receive and store the file yourself. See the section\n> [Server side implementation](#server-side-implementation) for more information.\n\nThis is all you need to get dropzone up and running, but if you want it to look\nlike the dropzone on this page, you’ll need to use the **dropzone.css**\nin the [dist folder](https://gitlab.com/meno/dropzone/builds/artifacts/master/download?job=release).\n\n\nWith RequireJS\n--------------\n\nDropzone is also available as an [AMD module](https://github.com/amdjs/amdjs-api/wiki/AMD)\nfor [RequireJS](http://requirejs.org).\n\nYou can find the [dropzone-amd-module](https://gitlab.com/meno/dropzone/builds/artifacts/master/file/dist/dropzone-amd-module.js?job=release)\nin the dist folder.\n\n\n\n# Usage\n\nThe typical way of using dropzone is by creating a form element with the class `dropzone`:\n\n```html\n<form action=\"/file-upload\"\n      class=\"dropzone\"\n      id=\"my-awesome-dropzone\"></form>\n```\n\nThat’s it. Dropzone will find all form elements with the class dropzone,\nautomatically attach itself to it, and upload files dropped into it to the\nspecified `action` attribute. The uploaded files can be handled just as if\nthere would have been a html input like this:\n\n```html\n<input type=\"file\" name=\"file\" />\n```\n\nIf you want another name than `file` you can [configure dropzone](#configuration)\nwith the option `paramName`.\n\n\nIf you want your file uploads to work even without JavaScript, you can include\nan element with the class `fallback` that dropzone will remove if the browser\nis supported. If the browser isn’t supported, Dropzone will not create fallback\nelements if there is a fallback element already provided. (Obviously, if the\nbrowser doesn’t support JavaScript, the form will stay as is)\n\nTypically this will look like this:\n\n```html\n<form action=\"/file-upload\" class=\"dropzone\">\n  <div class=\"fallback\">\n    <input name=\"file\" type=\"file\" multiple />\n  </div>\n</form>\n```\n\n\n\nCreate dropzones programmatically\n---------------------------------\n\nAlternatively you can create dropzones programmaticaly (even on non `form`\nelements) by instantiating the `Dropzone` class\n\n```js\n// Dropzone class:\nvar myDropzone = new Dropzone(\"div#myId\", { url: \"/file/post\"});\n```\n\nor if you use jQuery, you can use the jQuery plugin Dropzone ships with:\n\n```js\n// jQuery\n$(\"div#myId\").dropzone({ url: \"/file/post\" });\n```\n\n> Don’t forget to specify an `url` option if you’re not using a form element,\n> since Dropzone doesn’t know where to post to without an `action` attribute.\n\n\n\nServer side implementation\n--------------------------\n\nDropzone does *not* provide the server side implementation of handling the files,\nbut the way files are uploaded is identical to simple file upload forms like this:\n\n```html\n<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n  <input type=\"file\" name=\"file\" />\n</form>\n```\n\nTo handle basic file uploads on the server, please look at the corresponding\ndocumentation. Here are a few documentations, if you think I should add some,\nplease contact me.\n\n- [AngularJS and Spring](http://www.cantangosolutions.com/blog/Easy-File-Upload-Using-DropzoneJS-AngularJs-And-Spring)\n- [NodeJS with express](http://howtonode.org/really-simple-file-uploads)\n- [Ruby on rails](http://guides.rubyonrails.org/form_helpers.html#uploading-files)\n- [Complete PHP tutorial](http://www.startutorial.com/articles/view/how-to-build-a-file-upload-form-using-dropzonejs-and-php) by startutorial.com\n- [Basic PHP file upload](http://www.php.net/manual/en/features.file-upload.post-method.php#example-354)\n- [Tutorial for Dropzone and Lavarel (PHP)](http://maxoffsky.com/code-blog/howto-ajax-multiple-file-upload-in-laravel/) written by Maksim Surguy\n- [Symfony2 and Amazon S3](http://www.jesuisundev.fr/upload-drag-drop-via-dropzonejs-symfony2-on-cloud-amazon-s3/)\n- [File upload in ASP.NET MVC using Dropzone JS and HTML5](http://venkatbaggu.com/file-upload-in-asp-net-mvc-using-dropzone-js-and-html5/)\n- [Servicestack and Dropzone](http://www.buildclassifieds.com/2016/01/08/uploading-images-servicestack-and-dropzone/)\n- [How to build a file upload form using DropzoneJS and Go](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991)\n- [How to display existing files on server using DropzoneJS and Go](https://hackernoon.com/how-to-display-existing-files-on-server-using-dropzonejs-and-go-53e24b57ba19)\n\nPaid documentations:\n\n- [eBook for Dropzone with PHP](http://www.startutorial.com/homes/dropzonejs_php_the_complete_guide?utm_source=dzj&amp;utm_medium=banner&amp;utm_campaign=dropzonejs) by startutorial.com.\n\n\nPlease look at the [Dropzone FAQ](https://github.com/enyo/dropzone/wiki/FAQ) if\nyou need more information.\n\n\n\n\n# Configuration\n\nThere are two ways to configure dropzones.\n\nThe obvious way is to pass an options object when instantiating a dropzone\nprogrammatically like in the previous [create dropzones programmatically](#create-dropzones-programmatically)\nsection.\n\nBut if you just have HTML elements with the `dropzone` class, then you don’t\nprogrammatically instantiate the objects, so you have to store the configuration\nsomewhere so Dropzone knows how to configure the dropzones when instantiating\nthem.\n\nThis is done with the `Dropzone.options` object.\n\n```js\n// \"myAwesomeDropzone\" is the camelized version of the HTML element's ID\nDropzone.options.myAwesomeDropzone = {\n  paramName: \"file\", // The name that will be used to transfer the file\n  maxFilesize: 2, // MB\n  accept: function(file, done) {\n    if (file.name == \"justinbieber.jpg\") {\n      done(\"Naha, you don't.\");\n    }\n    else { done(); }\n  }\n};\n```\n\n\nIf you want to disable the auto discover behaviour of Dropzone, you can either disable\nit on a per element basis, or in general:\n\n```js\n// Prevent Dropzone from auto discovering this element:\nDropzone.options.myAwesomeDropzone = false;\n// This is useful when you want to create the\n// Dropzone programmatically later\n\n// Disable auto discover for all elements:\nDropzone.autoDiscover = false;\n```\n\n\n[List of configuration options](http://www.dropzonejs.com/#configuration-options)\n\n\n> You can also overwrite all default event actions in the options. So if you provide the option `drop` you can overwrite the default `drop` event handler.\n> *You should be familiar with the code if you do that because you can easily break the upload like this.*\n> If you just want to do additional stuff, like adding a few classes here and there, **[listen to the events](#events) instead**!\n\n\n## Enqueuing file uploads\n\nWhen a file gets added to the dropzone, its `status` gets set to `Dropzone.QUEUED`\n(after the `accept` function check passes) which means that the file is now\nin the queue.\n\nIf you have the option `autoProcessQueue` set to `true` then the queue is immediately\nprocessed, after a file is dropped or an upload finished, by calling\n`.processQueue()` which checks how many files are currently uploading,\nand if it’s less than `options.parallelUploads`, `.processFile(file)` is called.\n\nIf you set `autoProcessQueue` to `false`, then `.processQueue()` is never called\nimplicitly. This means that you have to call it yourself when you want to\nupload all files currently queued.\n\n\n\n## Layout\n\nThe HTML that is generated for each file by dropzone is defined with the option `previewTemplate` which defaults to this:\n\n```html\n<div class=\"dz-preview dz-file-preview\">\n  <div class=\"dz-details\">\n    <div class=\"dz-filename\"><span data-dz-name></span></div>\n    <div class=\"dz-size\" data-dz-size></div>\n    <img data-dz-thumbnail />\n  </div>\n  <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n  <div class=\"dz-success-mark\"><span>✔</span></div>\n  <div class=\"dz-error-mark\"><span>✘</span></div>\n  <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>\n```\n\nThe container (`dz-preview`) gets the `dz-processing` class when the file gets processed, `dz-success` when the file got uploaded and `dz-error` in case the file couldn’t be uploaded.\nIn the latter case, `data-dz-errormessage` will contain the text returned by the server.\n\nTo overwrite the default template, use the [`previewTemplate`](#config-previewTemplate)\nconfig.\n\nYou can access the HTML of the file preview in any of the events with `file.previewElement`.\n\nIf you decide to rewrite the `previewTemplate` from scratch, you should put elements with the `data-dz-*` attributes inside:\n\n- `data-dz-name`\n- `data-dz-size`\n- `data-dz-thumbnail` (This has to be an `<img />` element and the `alt` and `src` attributes will be changed by Dropzone)\n- `data-dz-uploadprogress` (Dropzone will change the `style.width` property from `0%` to `100%` whenever there’s a `uploadprogress` event)\n- `data-dz-errormessage`\n\nThe default options for Dropzone will look for those element and update the content for it.\n\nIf you want some specific link to remove a file (instead of the built in [`addRemoveLinks`](#config-addRemoveLinks) config), you can simply insert elements\nin the template with the `data-dz-remove` attribute. Example:\n\n```html\n<img src=\"removebutton.png\" alt=\"Click me to remove the file.\" data-dz-remove />\n```\n\nYou are not forced to use those conventions though. If you override all the default event listeners\nyou can completely rebuild your layout from scratch.\n\nSee the installation section on how to add the stylesheet and spritemaps if you want your dropzone to look like the one on this page.\n\nSee the [Theming](#theming) section, for a more in depth look at how to change Dropzone’s UI.\n\nI created an example where I made Dropzone look and feel exactly the way jQuery\nFile Uploader does with a few lines of configuration code. [Check it out!](/bootstrap.html)\n\n> Again, please look at the [Dropzone FAQ](https://github.com/enyo/dropzone/wiki/FAQ) if\n> you’re still unclear about some features.\n\n\n\n## Dropzone methods\n\nIf you want to remove an added file from the dropzone, you can call `.removeFile(file)`.\nThis method also triggers the `removedfile` event.\n\nHere’s an example that would automatically remove a file when it’s finished uploading:\n\n```js\nmyDropzone.on(\"complete\", function(file) {\n  myDropzone.removeFile(file);\n});\n```\n\nIf you want to remove all files, simply use `.removeAllFiles()`. Files that are\nin the process of being uploaded won’t be removed. If you want files that are\ncurrently uploading to be canceled, call `.removeAllFiles(true)` which will\ncancel the uploads.\n\n* * *\n\nIf you have `autoProcessQueue` disabled, you’ll need to call `.processQueue()`\nyourself.\n\nThis can be useful if you want to display the files and let the user click an\naccept button to actually upload the file(s).\n\n* * *\n\nTo access all files in the dropzone, use `myDropzone.files`.\n\nTo get\n\n- all accepted files: `.getAcceptedFiles()`\n- all rejected files: `.getRejectedFiles()`\n- all queued files: `.getQueuedFiles()`\n- all uploading files: `.getUploadingFiles()`\n\n* * *\n\nIf you do not need a dropzone anymore, just call `.disable()` on the object. This\nwill remove all event listeners on the element, and clear all file arrays. To\nreenable a Dropzone use `.enable()`.\n\n* * *\n\nIf you don’t like the default browser modals for `confirm` calls,\nyou can handle them yourself by overwriting `Dropzone.confirm`.\n\n```js\nDropzone.confirm = function(question, accepted, rejected) {\n  // Ask the question, and call accepted() or rejected() accordingly.\n  // CAREFUL: rejected might not be defined. Do nothing in that case.\n};\n```\n\n* * *\n\nIf you want Dropzone to download a file from your server and display it,\nyou can use\n\n```js\n// callback and crossOrigin are optional\nmyDropzone.createThumbnailFromUrl(file, imageUrl, callback, crossOrigin);\n```\n\nSee the FAQ on [How to show files stored on server](https://github.com/enyo/dropzone/wiki/FAQ#how-to-show-files-already-stored-on-server)\n for more information.\n\n\n\n# Events\n\nDropzone triggers events when processing files, to which you can register easily,\nby calling `.on(eventName, callbackFunction)` on your _instance_.\n\nSince listening to events can only be done on _instances_ of Dropzone, the best\nplace to setup your event listeners, is in the `init` function:\n\n```js\n// The recommended way from within the init configuration:\nDropzone.options.myAwesomeDropzone = {\n  init: function() {\n    this.on(\"addedfile\", function(file) { alert(\"Added file.\"); });\n  }\n};\n```\n\nIf you [create your Dropzones programmatically](#create-dropzones-programmatically),\nyou can setup your event listeners on your instances, like this:\n\n```js\n// This example uses jQuery so it creates the Dropzone, only when the DOM has\n// loaded.\n\n// Disabling autoDiscover, otherwise Dropzone will try to attach twice.\nDropzone.autoDiscover = false;\n// or disable for specific dropzone:\n// Dropzone.options.myDropzone = false;\n\n$(function() {\n  // Now that the DOM is fully loaded, create the dropzone, and setup the\n  // event listeners\n  var myDropzone = new Dropzone(\"#my-dropzone\");\n  myDropzone.on(\"addedfile\", function(file) {\n    /* Maybe display some more file information on your page */\n  });\n})\n```\n\nThis is a bit more complex, and not necessary unless you have a good reason\nto instantiate Dropzones programmatically.\n\n> Dropzone itself relies heavily on events. Everything that’s visual is created\nby listening to them. Those event listeners are setup in the default configuration\nof every Dropzone and can be overwritten, thus replacing the default behavior\nwith your own event callback.\n\nYou should only do this when you really know how Dropzone works, and when you\nwant to [completely theme your Dropzone](#theming)\n\n\n[List of events](http://www.dropzonejs.com/#event-list)\n\n\n## Theming\n\nIf you want to theme your Dropzone to look fully customized, in most cases you\ncan simply [replace the preview HTML template](#layout), adapt your CSS, and maybe create\na few additional event listeners.\n\nYou will go very far with this approach. As an example, I created an example\nwhere I made Dropzone look and feel exactly the way jQuery File Uploader does\nwith a few lines of configuration code. [Check it out!](/bootstrap.html)\n\nAs you can see, the biggest change is the `previewTemplate`. I then added a few\nadditional event listeners to make it look exactly like the reference.\n\n*You can however, implement your UI completely from scratch.*\n\nDropzone itself sets up a lot of event listeners when a Dropzone is created,\nthat handle all your UI. They do stuff like: create a new HTML element,\nadd the `<img>` element when provided with image data (with the [`thumbnail`](#event-thumbnail) event),\nupdate the progress bar when the [`uploadprogress`](#event-uploadprogress) event fires,\nshow a checkmark when the [`success`](#event-success) event fires,\netc...\n\n\n_Everything_ visual is done in those event handlers. If you would overwrite all\nof them with empty functions, Dropzone\nwould still be fully functional, but wouldn’t display the dropped files anymore.\n\n> If you like the default look of Dropzone, but would just like to add a few\n> bells and whistles here and there, you should just [add additional event \n> listeners](#events) instead.\n\nOverwriting the default event listeners, and creating your own, custom Dropzone,\nwould look something like this:\n\n\n```js\n// This is an example of completely disabling Dropzone's default behavior.\n// Do *not* use this unless you really know what you are doing.\nDropzone.myDropzone.options = {\n  previewTemplate: document.querySelector('#template-container').innerHTML,\n  // Specifing an event as an configuration option overwrites the default\n  // `addedfile` event handler.\n  addedfile: function(file) {\n    file.previewElement = Dropzone.createElement(this.options.previewTemplate);\n    // Now attach this new element some where in your page\n  },\n  thumbnail: function(file, dataUrl) {\n    // Display the image in your file.previewElement\n  },\n  uploadprogress: function(file, progress, bytesSent) {\n    // Display the progress\n  }\n  // etc...\n};\n```\n\nObviously this lacks the actual implementation. Look at the source to see how\nDropzone does it internally.\n\nYou should use this option if you don’t need any of the default Dropzone UI,\nbut are only interested in Dropzone for it’s event handlers, file upload and\ndrag’n’drop functionality.\n\n\n# Tips\n\nIf you do not want the default message at all (»Drop files to upload (or click)«), you can\nput an element inside your dropzone element with the class `dz-message` and dropzone\nwill not create the message for you.\n\n* * *\n\nDropzone will submit any hidden fields you have in your dropzone form. So this\nis an easy way to submit additional data. You can also use the `params` option.\n\n* * *\n\nDropzone adds data to the `file` object you can use when events fire. You can\naccess `file.width` and `file.height` if it’s an image, as well as\n`file.upload` which is an object containing: `progress` (0-100), `total` (the\ntotal bytes) and `bytesSent`.\n\n* * *\n\nIf you want to add additional data to the file upload that has to be specific for\neach file, you can register for the [`sending`](#event-sending) event:\n\n```js\nmyDropzone.on(\"sending\", function(file, xhr, formData) {\n  // Will send the filesize along with the file as POST data.\n  formData.append(\"filesize\", file.size);\n});\n```\n\n* * *\n\nTo access the preview html of a file, you can access `file.previewElement`. For\nexample:\n\n```js\nmyDropzone.on(\"addedfile\", function(file) {\n  file.previewElement.addEventListener(\"click\", function() {\n    myDropzone.removeFile(file);\n  });\n});\n```\n\n* * *\n\nIf you want the whole body to be a Dropzone and display the files somewhere else\nyou can simply instantiate a Dropzone object for the body, and define the\n[`previewsContainer`](#config-previewsContainer) option. The `previewsContainer` should have the\n`dropzone-previews` or `dropzone` class to properly display the file previews.\n\n```js\nnew Dropzone(document.body, {\n  previewsContainer: \".dropzone-previews\",\n  // You probably don't want the whole body\n  // to be clickable to select files\n  clickable: false\n});\n```\n\n\n\nLook at the [gitlab wiki](https://gitlab.com/meno/dropzone/wikis/home) for more examples.\n\nIf you have any problems using Dropzone, please try to find help on\n[stackoverflow.com](http://stackoverflow.com/) by using the `dropzone.js`\ntag.\nOnly create an issue on Github when you think you found a bug or want to\nsuggest a new feature.\n\n\n# Compatibility\n\nThis section describes compatibility with browsers and older versions of\nDropzone.\n\nBrowser Support\n---------------\n\n- Chrome 7+\n- Firefox 4+\n- IE 10+\n- Opera 12+ (Version 12 for MacOS is disabled because their API is buggy)\n- Safari 6+\n\nFor all the other browsers, dropzone provides an oldschool file input fallback.\n\nThere is no workaround for drag’n’drop in older browsers – it simply isn't\nsupported. The same goes for image previews, etc... But using dropzone, your\nusers using an old browser _will_ be able to upload files. It just won’t look\nand feel great. But hey, that’s their fault.\n\nVersion 5.0\n---------\n\n- Starting with version 5.2, dropzone is no longer written in CoffeeScript, but in EcmaScript6. To\n  still work in older browsers, the code is still compiled with babel.\n\nVersion 4.0\n-----------\n\n<aside>This is not a changelog. Only compatibility problems are listed.</aside>\n\n- Changed the default [`previewTemplate`](#config-previewTemplate). Check out the\n  new one in the [layout section](#layout).\n- Using an already included SVG instead of a PNG spritemap (the CSS file is now\n  the only additional file that you need to include)\n\n\nVersion 3.0\n-----------\n\n<aside>This is not a changelog. Only compatibility problems are listed.</aside>\n\n- All classes are prefixed with `dz-` now to prevent clashing with other CSS definitions\n- The way `previewTemplate` is defined has changed. You have to provide `data-dz-*` elements now\n- If the server returns JSON, it will be parsed for error messages as well\n- There’s a `dict*` option for all of the visible messages\n- Lots of minor fixes and changes\n\nVersion 2.0\n-----------\n\n<aside>This is not a changelog. Only compatibility problems are listed.</aside>\n\nStarting with version 2.0, Dropzone no longer depends on jQuery, but Dropzone\nstill registers itself as a jQuery module if available.\n\nThat means that creating your Dropzones like this still works:\n\n```js\n$(\"#my-dropzone\").dropzone({ /* options */ });\n```\n\nIf you create your Dropzones with the normal constructor though, you have to\npass either the raw HTMLElement, or a selector string. So those versions all\nwork:\n\n```js\n// With jQuery\nnew Dropzone($(\"#my-dropzone\").get(0));\n// Without jQuery\nnew Dropzone(\"#my-dropzone\");\nnew Dropzone(document.querySelector(\"#my-dropzone\"));\n```\n\nAnother thing that changed, is that Dropzone no longer stores its instances\ninside the element’s data property. So to get a dropzone for an element do this\nnow:\n\n```js\n// DEPRECATED, do not use:\n$(\"#my-dropzone\").data(\"dropzone\"); // won't work anymore\n// Do this now:\nDropzone.forElement(element); // Providing a raw HTMLElement\n// or\nDropzone.forElement(\"#my-dropzone\"); // Providing a selector string.\n```\n\n\n# Why another library?\n\nI realize that there [are](http://valums.com/ajax-upload/) [already](http://tutorialzine.com/2011/09/html5-file-upload-jquery-php/) [other](https://github.com/taylor/html5uploader) [libraries](http://blueimp.github.com/jQuery-File-Upload/) out there but the reason I decided to write my own are the following:\n\n- I didn't want it to be too big, and to cumbersome to dive into.\n- I want to design my own elements. I only want to register callbacks so I can update my elements accordingly.\n- Big files should get uploaded without a problem.\n- I wanted a callback for image previews, that don't kill the browser if too many too big images are viewed.\n- I want to use the latest API of browsers. I don't care if it falls back to the normal upload form if the browser is too old.\n- I don't think that it's necessary anymore to depend on libraries such as jQuery (especially when providing functionality that isn't available in old browsers anyway).\n\n# MIT License\n\nSee LICENSE file\n","readmeFilename":"README.md"}