Created
June 30, 2016 14:04
-
-
Save tuckbloor/4ae82fe48db0137f2f5922fc480664ff to your computer and use it in GitHub Desktop.
dopzone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| Dropzone.autoDiscover = false; | |
| $("form#dropzone").dropzone({ | |
| autoProcessQueue: false, | |
| maxFiles: 1, | |
| init: function () { | |
| var dropzone = this; | |
| $('#uploadSubmit').on('click', function (e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| dropzone.processQueue(); | |
| }); | |
| }, | |
| url: "/document-upload", | |
| acceptedFiles: ".pdf, .xls, .xlsx, .jpg, .jpeg, .pjpeg, .doc, .docx, .xlsm, .xltx, .xltm, .msg", | |
| success: function () { | |
| this.removeAllFiles(); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment